Skip to content

Instantly share code, notes, and snippets.

@flyemsafe
Last active November 5, 2019 03:06
Show Gist options
  • Select an option

  • Save flyemsafe/b8ca8c28f6dc085300c272901b907c93 to your computer and use it in GitHub Desktop.

Select an option

Save flyemsafe/b8ca8c28f6dc085300c272901b907c93 to your computer and use it in GitHub Desktop.

Revisions

  1. flyemsafe renamed this gist Nov 5, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. flyemsafe created this gist Nov 4, 2019.
    48 changes: 48 additions & 0 deletions md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    ```
    - name: PLAY| install satellite server
    hosts: satellite
    gather_facts: yes
    become: yes
    vars_files:
    - vars/all.yml
    - vars/vault.yml
    - vars/satellite_server.yml

    tasks:
    - name: check if satellite is running
    uri:
    url: "https://{{ satellite_hostname }}.{{ satellite_domain }}/api/organizations"
    user: "{{ satellite_user }}"
    password: "{{ satellite_pass }}"
    force_basic_auth: yes
    register: satellite_is_installed
    ignore_errors: yes
    tags: [ always ]

    - set_fact:
    satellite_is_installed: "{{ False if satellite_is_installed.failed | default(False) or satellite_is_installed.status != 200 else True }}"
    tags: [ always ]

    - name: end play if satellite is running
    meta: end_play
    when: satellite_is_installed|bool

    - name: ensure system is registered to Red Hat
    vars:
    rhsm_repos: "{{ satellite_repos }}"
    include_role:
    name: swygue-redhat-subscription

    - name: create satellite paritions
    include_role:
    name: swygue-lvm

    - name: TASK| running swygue-install-satellite role
    include_role:
    name: swygue-install-satellite
    ```

    Roles
    * https://github.com/flyemsafe/swygue-redhat-subscription
    * https://github.com/flyemsafe/swygue-lvm
    * https://github.com/flyemsafe/swygue-install-satellite