| | |
| | | :tag1: configure_satellite |
| | | :tag2: configure_satellite_activationkey |
| | | :main_file: tasks/main.yml |
| | | :version_file: tasks/version_6.4.yml |
| | | :script_file: files/activationkey_script_version_6.4.sh |
| | | :version_file: tasks/version_6.x.yml |
| | | |
| | | Role: {role} |
| | | ============ |
| | |
| | | |
| | | Following are the requirements: |
| | | |
| | | . Satellite must be install and setup. |
| | | . Hammer cli config must be configured/updated with privileged user and password to run the satellite cli. |
| | | . Subscription, Life-cycle, and content-view should be exist. |
| | | |
| | | . Satellite installed and setted up. |
| | | . foreman-ansible-modules ansible collection available on satellite hosts |
| | | . Subscription, Life-cycle, and content-view should exist. |
| | | |
| | | |
| | | Role Variables |
| | | -------------- |
| | | |
| | | * Following are the variable which needs to be defined |
| | | * Following are the variable which needs to be defined |
| | | |
| | | |=== |
| | | |satellite_version: "Digit" |Required |satellite version |
| | |
| | | |life_cycle: "String" | Required | Name of life_cycle for activation key |
| | | |subscriptions: [List] | Required | List of subscriptions to add in activation key |
| | | |=== |
| | | |
| | | |
| | | * Example variables |
| | | |
| | | [source=text] |
| | | ---- |
| | | satellite_version: 6.4 |
| | | satellite_version: 6.7 |
| | | org: "gpte" |
| | | org_label: "gpte" |
| | | org_description: "Global Partner Training and Enablement" |
| | | satellite_content: |
| | | - name: "Ansible server" |
| | | life_cycle: "Prod" |
| | | life_cycle: "Production" |
| | | content_view: "Ansible servers content" |
| | | activation_key: "capsule_server_key" |
| | | subscriptions: |
| | | - "Employee SKU |
| | | - "Employee SKU |
| | | - name: "Three Tier App" |
| | | life_cycle: "Dev" |
| | | life_cycle: "Development" |
| | | content_view: "Three Tier App" |
| | | activation_key: "three_tier_app" |
| | | subscriptions: |
| | |
| | | [source=text] |
| | | ---- |
| | | [user@desktop ~]$ cat sample_vars.yml |
| | | satellite_version: 6.4 |
| | | satellite_version: 6.7 |
| | | org: "gpte" |
| | | org_label: "gpte" |
| | | org_description: "Global Partner Training and Enablement" |
| | | satellite_content: |
| | | - name: "Ansible server" |
| | | life_cycle: "Prod" |
| | | life_cycle: "Production" |
| | | content_view: "Ansible servers content" |
| | | activation_key: "capsule_server_key" |
| | | subscriptions: |
| | | - "Employee SKU |
| | | - "Employee SKU |
| | | - name: "Three Tier App" |
| | | life_cycle: "Dev" |
| | | life_cycle: "Development" |
| | | content_view: "Three Tier App" |
| | | activation_key: "three_tier_app" |
| | | subscriptions: |
| | |
| | | - hosts: satellite.example.com |
| | | vars_files: |
| | | - sample_vars.yml |
| | | roles: |
| | | - satellite-manage-activationkey |
| | | tasks: |
| | | - include_role: |
| | | name: "{{ item }}" |
| | | with_items: |
| | | - satellite-manage-activationkey |
| | | |
| | | [user@desktop ~]$ ansible-playbook playbook.yml |
| | | ---- |
| | |
| | | Tips to update Role |
| | | ------------------ |
| | | |
| | | To extend role works for other version, create new file named version_{{satellite_version}}.yml and import newly created file in main.yml . Create new script in files directory for activation key action. |
| | | To extend role works for other version, if necessary create new file named version_{{satellite_version}}.yml and import newly created file in main.yml . |
| | | |
| | | for reference look at link:{main_file}[main.yml] , link:{version_file}[version_6.4.yml] and link:{script_file}[script] |
| | | for reference look at link:{main_file}[main.yml] and link:{version_file}[version_6.x.yml] |
| | | |
| | | |
| | | Author Information |