Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update playbooks #1

Open
wants to merge 150 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
e72e82e
update
psehgaft Apr 30, 2023
97ab066
update
psehgaft May 1, 2023
89f1da6
update
psehgaft May 1, 2023
c4a7ba3
changes
psehgaft May 2, 2023
9647b37
changes
psehgaft May 2, 2023
653f8f5
changes
psehgaft May 2, 2023
f8a5671
for get keys and servers
psehgaft May 2, 2023
8b1671a
example
psehgaft May 2, 2023
73ee6d1
inventory and vars
May 3, 2023
cf92c7f
update
psehgaft May 3, 2023
d08ab20
update
psehgaft May 3, 2023
82e4884
update
psehgaft May 3, 2023
958dd59
update
psehgaft May 3, 2023
88b0621
update
psehgaft May 3, 2023
d4964f1
update
psehgaft May 3, 2023
d54ebdf
update
psehgaft May 3, 2023
bec0443
update
psehgaft May 3, 2023
3fb7ce4
update
psehgaft May 3, 2023
070db11
update
psehgaft May 3, 2023
73a37e9
update
psehgaft May 3, 2023
9f6a7f4
update
psehgaft May 3, 2023
c7a0c7d
update
psehgaft May 3, 2023
e41aed7
update
psehgaft May 3, 2023
26cc685
update
psehgaft May 3, 2023
2f1d9ef
update
psehgaft May 3, 2023
c8fab73
update
psehgaft May 3, 2023
2049884
update
psehgaft May 3, 2023
90f422e
update
psehgaft May 3, 2023
1bb446d
update
psehgaft May 3, 2023
f30dd3d
update
psehgaft May 3, 2023
6a990ae
update
psehgaft May 3, 2023
c1198ef
update
psehgaft May 3, 2023
e9626f6
update
psehgaft May 3, 2023
f5a4a24
update
psehgaft May 3, 2023
96d0a24
update
psehgaft May 3, 2023
68546d9
update
psehgaft May 3, 2023
668faa2
update
psehgaft May 3, 2023
07d7a46
update
psehgaft May 3, 2023
0a4d4fc
update
psehgaft May 3, 2023
029ab1c
update
psehgaft May 3, 2023
dc5cdbc
update
psehgaft May 3, 2023
41e2ddf
update
psehgaft May 3, 2023
fa5430c
update
psehgaft May 3, 2023
99772be
update
psehgaft May 3, 2023
0f268cf
update
psehgaft May 3, 2023
5842c3c
update
psehgaft May 3, 2023
d0873ae
update
psehgaft May 3, 2023
4074840
update
psehgaft May 3, 2023
4d33092
update
psehgaft May 3, 2023
10ee0d6
update
psehgaft May 3, 2023
14af900
update
psehgaft May 3, 2023
e327ddc
update
psehgaft May 3, 2023
33de6e5
update
psehgaft May 3, 2023
d86122f
update
psehgaft May 3, 2023
e121451
update
psehgaft May 3, 2023
bd25f76
update
psehgaft May 3, 2023
f83cfa4
update
psehgaft May 3, 2023
e366c44
update
psehgaft May 3, 2023
661eaf9
update
psehgaft May 3, 2023
bcb69d5
update
psehgaft May 3, 2023
cacbceb
update
psehgaft May 3, 2023
8b535d3
update
psehgaft May 3, 2023
80394a6
update
psehgaft May 3, 2023
4dca0ef
update
psehgaft May 3, 2023
182943d
update
psehgaft May 3, 2023
39cd510
update
psehgaft May 3, 2023
78fae12
update
psehgaft May 3, 2023
ccb2504
update
psehgaft May 3, 2023
9347466
update
psehgaft May 3, 2023
c30dc1b
update
psehgaft May 3, 2023
a1e91ea
update
psehgaft May 3, 2023
db72df1
update
psehgaft May 3, 2023
b59e24b
update
psehgaft May 3, 2023
af99ff5
update
psehgaft May 3, 2023
6368bff
update
psehgaft May 3, 2023
2370913
update
psehgaft May 3, 2023
10c2480
update
psehgaft May 3, 2023
afe2fac
update
psehgaft May 3, 2023
529c5f7
update
psehgaft May 3, 2023
2716781
update
psehgaft May 3, 2023
714c6b2
update
psehgaft May 3, 2023
813ed17
update
psehgaft May 3, 2023
edc3c05
update
psehgaft May 3, 2023
4029fa9
update
psehgaft May 3, 2023
db579a5
update
psehgaft May 4, 2023
cd32567
update
psehgaft May 4, 2023
542adf1
update
psehgaft May 4, 2023
322ae7a
update
psehgaft May 4, 2023
ead3851
update
psehgaft May 4, 2023
92e5eec
update
psehgaft May 4, 2023
1b6f654
update
psehgaft May 4, 2023
95b5d24
update
psehgaft May 4, 2023
e70a7f9
update
psehgaft May 4, 2023
ad2538c
update
psehgaft May 4, 2023
892f0fb
update
psehgaft May 4, 2023
ad85f1c
update
psehgaft May 4, 2023
2f20827
update
psehgaft May 4, 2023
8389e6a
update
psehgaft May 4, 2023
e89f985
update
psehgaft May 4, 2023
596d652
update
psehgaft May 4, 2023
05f3e5e
update
psehgaft May 4, 2023
a00f324
update
psehgaft May 4, 2023
ff96c77
update
psehgaft May 4, 2023
e1c5622
update
psehgaft May 4, 2023
b5eb213
update
psehgaft May 4, 2023
2ff6afd
update
psehgaft May 4, 2023
7eb04e9
update
psehgaft May 4, 2023
7e2b9a7
update
psehgaft May 4, 2023
4836784
update
psehgaft May 4, 2023
e3670e3
inventory
May 4, 2023
88b487e
update
psehgaft May 4, 2023
94a0d6b
Merge branch 'master' of github.com:psehgaft/ansible-satellite
psehgaft May 4, 2023
c6d952c
update
psehgaft May 4, 2023
1f37ca1
update
psehgaft May 4, 2023
3f4dec2
update
psehgaft May 4, 2023
01cdfc5
update
psehgaft May 4, 2023
bd00aa5
update
psehgaft May 4, 2023
f36394e
update
psehgaft May 4, 2023
6892a64
update
psehgaft May 4, 2023
0ccd839
update
psehgaft May 4, 2023
3ec56ce
update
psehgaft May 4, 2023
daacd86
update
psehgaft May 4, 2023
05de094
update
psehgaft May 4, 2023
e25a874
update
psehgaft May 4, 2023
99eab72
update
psehgaft May 4, 2023
890fc0c
update
psehgaft May 4, 2023
bab0af4
update
psehgaft May 4, 2023
e39a1a6
update
psehgaft May 4, 2023
dd788e8
update
psehgaft May 4, 2023
f0a37ec
update
psehgaft May 4, 2023
7dc0577
update
psehgaft May 4, 2023
f9361b1
update
psehgaft May 4, 2023
22a83f3
update
psehgaft May 4, 2023
93f89bc
update
psehgaft May 4, 2023
faaa10c
update
psehgaft May 4, 2023
73935c5
update
psehgaft May 4, 2023
97b4ef2
update
psehgaft May 4, 2023
ea76466
update
psehgaft May 4, 2023
16b1754
update
psehgaft May 4, 2023
c586d3b
update
psehgaft May 4, 2023
072957e
update
psehgaft May 4, 2023
d3cec85
update
psehgaft May 4, 2023
be68e04
update
psehgaft May 4, 2023
bbe81c8
update
psehgaft May 4, 2023
533012e
update
psehgaft May 4, 2023
1cfedec
documentation
psehgaft May 4, 2023
e2a6c53
documentation
psehgaft May 4, 2023
39f2fe7
update documentations
psehgaft May 4, 2023
3f6a188
docs
psehgaft May 4, 2023
9f13005
documentation ready
psehgaft May 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.inv
.vagrant
.git
.git
*.pdf
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Contributing to ansible-satellite

Feel free to contribute to the source code. This set of Ansible plays was contibuted by **Stephen Clayton** _[stephenpc@gmail.com](mailto:stephenpc@gmail.com)_.
Feel free to contribute to the source code.

Contributors
---

- [stephenpc](https://github.com/stephenpc)
- [defionscode](https://github.com/defionscode)
- [stenwt](https://github.com/stenwt)
- [psehgaft](https://github.com/psehgaft)
119 changes: 101 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# ansible-satellite | Satellite 6.1.x Orchestration
# ansible-satellite | Satellite 6.12.x Orchestration

### Install and configure Satellite 6.1.x on Red Hat Enterprise Linux 6.x and 7.x. This collection can also be used to set up Satellite on AWS.
### Install and configure Satellite 6.12.x on Red Hat Enterprise Linux 6.x and 7.x. This collection can also be used to set up Satellite on AWS.

Fundamental steps are based on the process outlined at the [Satellite 6.1 Installation Guide on the Red Hat Customer Portal](https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/6.1/html/Installation_Guide/index.html).
Fundamental steps are based on the process outlined at the [Satellite 6.1 Installation Guide on the Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_satellite/6.12/html-single/installing_satellite_server_in_a_connected_network_environment/index).

At the last revision of this document, the current stable version of Satellite is 6.1.8.
At the last revision of this document, the current stable version of Satellite is 6.7

Reference [standup.yml](standup.yml), which is the installation playbook, to see an example of how the playbooks may be structured, or take a look at any of the listed playbooks below.

### **ansible-satellite roles:**
_The following roles are called by several playbooks to orchestrate tasks on the Satellite server. Please review the playbooks to see how these come together to work._

1. [satellite-clients](#create-clients-tools-for-register)
1. [satellite-auth](#satellite-authentication-satellite-auth)
1. [satellite-content](#satellite-content-satellite-content)
1. [satellite-install](#satellite-installation-satellite-install)
Expand Down Expand Up @@ -39,21 +40,86 @@ _These scripts are written to aid in refreshing subscriptions on all the hosts,
1. [bash-refresh_subscriptions.sh](#bash-refresh_subscriptionssh)
1. [bash-recreate_subscriptions.sh](#bash-recreate_subscriptionssh)

### Configure Playbook
Copy the inventory.template file and fill it out with information for your infrastructure. Add systems to [nodes] for hosts you want tasks to run on.

or create a current host inventory on */goup_vars/inventorycontent.yml*

```inventorycontext.yml
[satellite]
satellite.example.com

[old_satellite]
satellite.example.com

[puppet_master]
satellite.example.com

[puppet_ca]
satellite.example.com

[6RedHatEnterpriseServer:vars]
activationkey='server,6epel'

[7RedHatEnterpriseServec:vars]
activationkey='workstation,6epel'

[nodes]
node1.example.com activationkey= organization=
node2.example.com activationkey= organization=

[satellite]
satellite.example.com

[old_satellite]
satellite.example.com

#[nodes]
# host.example.com organization=EXAMPLE activationkey=rhel_activation_key"
```
Use activation keys to register the hosts so make sure your activation keys are set up in satellite before running.

#Running

Enable the satellite settings create_new_host_when_facts_are_uploaded and create_new_host_when_report_is_uploaded to have hosts automatically created after puppet runs. You should also enable a default_location and default_organization in satellite. These settings are all under the puppet tab.

To run on all of your nodes (defined in hosts) make sure you update the activationkey variables (in hosts) and then use.

`ansible-playbook -i inventorycontext.yml satellite-playbook.yaml`

Add `-k` (ssh) or `-K` (sudo) if you need password prompts.

You can also run just the puppet registration tasks with

`ansible-playbook -i inventorycontext.yml satellite-playbook.yaml --tags puppet`

After the tasks complete you should have new unmanaged hosts in satellite. Edit the host and add any configuration you need (host groups, network, puppet). Unfortunately, I could not find a way to automate those steps yet. Your best bet is probably [hammer](https://github.com/theforeman/hammer-cli).

Once the hosts have been moved you may need to reinstall the katello-agent. Do that with `ansible all -i hosts -m yum -a "state=absent name=katello-agent"` and then `ansible all -i hosts -m yum -a "state=present name=katello-agent"`

NOTE: For create a Satellite inventory from de old-satellite in a Satellite migration you need to use:

`ansible-playbook -i inventorycontext.yml create_inventory.yml`

For resubscribe nodes in a new satellite based in your inventory context elments

`ansible-playbook -i inventorycontext.yml satellite_re_subscribe.yml`

---

# Roles

## Satellite Authentication (**satellite-auth**)
_This role sets up the Satellite Server with authenticated local users, or ties it into a central LDAP server for authentication._

Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-auth/vars/main.yml](roles/satellite-auth/vars/main.yml), [all.yml](group_vars/all.yml) and [secrets.yml](group_vars/secrets.yml).
Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-auth/vars/main.yml](roles/satellite-auth/vars/main.yml), [satellite.yml](group_vars/satellite.yml) and [secrets.yml](group_vars/secrets.yml).

```yaml
---
- hosts: satellite6-server-prod
become: yes
vars_files:
- group_vars/all.yml
- group_vars/satellite.yml
- group_vars/secrets.yml
gather_facts: yes
# satellite-auth | Define users and assign them roles
Expand All @@ -63,17 +129,34 @@ Invoke the role in the following way. Please note the configuration values speci
# ldap_refresh: yes
```

## Ansible Satellite Clients (**satellite-clients**)
_This role include tools for subscribe and unsubscribe nodes on your satellite.

nvoke the role/tasks in the following way. Please note the configuration values specified in [roles/satellite-content/vars/main.yml](roles/satellite-content/vars/main.yml), [satellite.yml](group_vars/satellite.yml) and [secrets.yml](group_vars/secrets.yml).

```yaml
---
- hosts: satellite6-server-prod
become: yes
vars_files:
- group_vars/satellite.yml
- group_vars/secrets.yml
gather_facts: yes
tasks:
- include_tasks: ./roles/satellite-clients/tasks/[task].yml
```

## Satellite Content (**satellite-content**)
_This role creates lifecycle environments on the Satellite Server, creates content views and filters them, then sets up activation keys pointing to each, and a release version with wich to activate RHEL systems._

Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-content/vars/main.yml](roles/satellite-content/vars/main.yml), [all.yml](group_vars/all.yml) and [secrets.yml](group_vars/secrets.yml).
Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-content/vars/main.yml](roles/satellite-content/vars/main.yml), [satellite.yml](group_vars/satellite.yml) and [secrets.yml](group_vars/secrets.yml).

```yaml
---
- hosts: satellite6-server-prod
become: yes
vars_files:
- group_vars/all.yml
- group_vars/satellite.yml
- group_vars/secrets.yml
gather_facts: yes
roles:
Expand All @@ -83,14 +166,14 @@ Invoke the role in the following way. Please note the configuration values speci
## Satellite Installation (**satellite-install**)
_This role installs Satellite to a RHEL host._

Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-install/vars/main.yml](roles/satellite-install/vars/main.yml), [all.yml](group_vars/all.yml) and [secrets.yml](group_vars/secrets.yml).
Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-install/vars/main.yml](roles/satellite-install/vars/main.yml), [satellite.yml](group_vars/satellite.yml) and [secrets.yml](group_vars/secrets.yml).

```yaml
---
- hosts: satellite6-server-prod
become: yes
vars_files:
- group_vars/all.yml
- group_vars/satellite.yml
- group_vars/secrets.yml
gather_facts: yes
# satellite-install | Install Satellite 6 to a host
Expand All @@ -101,7 +184,7 @@ Invoke the role in the following way. Please note the configuration values speci
## Satellite Maintenance Tasks (**satellite-maintenance**)
_This role covers several items with regard to maintaining the security of the Satellite server, such as SSL configuration. It also provides orchestration of rpm content to the Satellite server, so that it can be made available to hosts on a regular basis. It leverages some variables from the **satellite-content** role as well._

Invoke the role in the following way. Please note the configuration values specified in [satellite-maintenance/vars/main.yml](roles/satellite-maintenance/vars/main.yml), [satellite-content/vars/main.yml](roles/satellite-content/vars/main.yml), [all.yml](group_vars/all.yml) and [secrets.yml](group_vars/secrets.yml).
Invoke the role in the following way. Please note the configuration values specified in [satellite-maintenance/vars/main.yml](roles/satellite-maintenance/vars/main.yml), [satellite-content/vars/main.yml](roles/satellite-content/vars/main.yml), [satellite.yml](group_vars/satellite.yml) and [secrets.yml](group_vars/secrets.yml).

```yaml
---
Expand All @@ -120,14 +203,14 @@ Invoke the role in the following way. Please note the configuration values speci
## Amazon Route53 DNS Registration (**satellite-route53**)
_This role adds an entry into Amazon Route53 DNS for the Satellite server._

Invoke the role in the following way. Please note the configuration values specified in [all.yml](group_vars/all.yml).
Invoke the role in the following way. Please note the configuration values specified in [satellite.yml](group_vars/satellite.yml).

```yaml
---
- hosts: satellite6-server-prod
become: yes
vars_files:
- group_vars/all.yml
- group_vars/satellite.yml
- group_vars/secrets.yml
gather_facts: yes
roles:
Expand All @@ -139,14 +222,14 @@ Invoke the role in the following way. Please note the configuration values speci
## Satellite Self-Subscription (**satellite-selfsubscribe**)
_This roles subscribes the Satellite server to itself. It pauses for a period to allow someone to update the Satellite server manifest at the **Red Hat Customer Portal > Subscription Management > [Subscription Management Applications](https://access.redhat.com/management/distributors?type=satellite) > Satellite**, and will then continue to set Satellite up to receive content filtered in the same way as other systems._

Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-selfsubscribe/vars/main.yml](roles/satellite-selfsubscribe/vars/main.yml), [all.yml](group_vars/all.yml) and [secrets.yml](group_vars/secrets.yml).
Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-selfsubscribe/vars/main.yml](roles/satellite-selfsubscribe/vars/main.yml), [satellite.yml](group_vars/satellite.yml) and [secrets.yml](group_vars/secrets.yml).

```yaml
---
- hosts: satellite6-server-prod
become: yes
vars_files:
- group_vars/all.yml
- group_vars/satellite.yml
- group_vars/secrets.yml
gather_facts: yes
roles:
Expand All @@ -165,14 +248,14 @@ Note: A manifest can been created and included as part of this playbook. It can
## Satellite Setup (**satellite-setup**)
_This role ties the Satellite server to Red Hat using the manifest mentioned above, activates products, repositories, and also brings in Docker images from the Red Hat Registry, along with 3rd party and custom repositories for your own generated RPM content._

Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-setup/vars/main.yml](roles/satellite-setup/vars/main.yml), [all.yml](group_vars/all.yml) and [secrets.yml](group_vars/secrets.yml)
Invoke the role in the following way. Please note the configuration values specified in [roles/satellite-setup/vars/main.yml](roles/satellite-setup/vars/main.yml), [satellite.yml](group_vars/satellite.yml) and [secrets.yml](group_vars/secrets.yml)

```yaml
---
- hosts: satellite6-server-prod
become: yes
vars_files:
- group_vars/all.yml
- group_vars/satellite.yml
- group_vars/secrets.yml
gather_facts: yes
roles:
Expand All @@ -182,7 +265,7 @@ Invoke the role in the following way. Please note the configuration values speci
## Satellite In-Place Upgrade (**satellite-upgrade**)
_This role performs an in-place upgrade of Satellite 6.1 to the current 6.1.x release._

Invoke the role in the following way. Please note the configuration values specified in [all.yml](group_vars/all.yml).
Invoke the role in the following way. Please note the configuration values specified in [satellite.yml](group_vars/satellite.yml).

```yaml
---
Expand Down
Binary file added ansible-datellite.tar
Binary file not shown.
84 changes: 84 additions & 0 deletions create_inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
# ansible-satellite | Satellite 6.x Orchestration
- hosts: old_satellite
become: yes
vars_files:
- group_vars/satellite.yml
- group_vars/secrets.yml
gather_facts: no

tasks:
- set_fact:
inventory_content: []

- name: ":::: Get organizations ::::"
import_tasks: ./roles/satellite-content/tasks/get_orgs.yml

- name: ":::: Create content inventory ::::"
include_tasks: ./roles/satellite-content/tasks/create_content_inventory.yml
with_items: "{{ organizations_list }}"
vars:
node:
organization: "{{ item }}"

- set_fact:
inventory_satellite: "{{ inventory_content }}"
inventory_content: []

- name: ":::: Get list of all activation keys ::::"
include_tasks: ./roles/satellite-content/tasks/get_activation_keys_for_org.yml
with_items: "{{ inventory_satellite }}"
vars:
organization: "{{ item.organization }}"

- set_fact:
inventory_satellite: "{{ inventory_content }}"
inventory_content: []

- name: ":::: Get Host and Key subscriptions ::::"
include_tasks: ./roles/satellite-content/tasks/get_nodes_for_keys.yml
with_items: "{{ inventory_satellite }}"
vars:
organization: "{{ item.organization }}"
activation_key: "{{ item.activationkey }}"

- set_fact:
inventory_satellite: "{{ inventory_content }}"
inventory_content: []

- name: ":::: Create content inventory file ::::"
include_tasks: ./roles/satellite-content/tasks/create_content_inventory_file.yml
vars:
inventory_content: "{{ inventory_satellite }}"
with_items: "{{ inventory_satellite }}"

- hosts: localhost
become: yes
vars_files:
- group_vars/satellite.yml
- group_vars/secrets.yml
- group_vars/inventory_content.yml
gather_facts: yes

tasks:

# create dynamic groups to define variables
- group_by:
key: "{{ ansible_distribution }}-{{ ansible_distribution_version | truncate(1, True, '') }}"

- set_fact:
ak: "{{ ansible_distribution }}-{{ ansible_distribution_version | truncate(1, True, '') }}"

- name: ":::: Get repos for host ::::"
include_tasks: roles/satellite-clients/tasks/client_get_enable_repos.yml

- name: ":::: Unregister host ::::"
include_tasks: ./roles/satellite-clients/tasks/client_unsubscribe.yml
vars:
satellite: "{{ groups['old_satellite'][0] }}"

- name: ":::: Register host ::::"
include_tasks: ./roles/satellite-clients/tasks/client_unsubscribe.yml
vars:
satellite: "{{ groups['satellite'][0] }}"
activationkey: "{{ groups[ak] }}"
6 changes: 3 additions & 3 deletions ec2_content_hosts_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
prompt: "Enter your username. (Required, defaults to admin)"
default: "admin"
private: no
- name: "sat_admin_password"
- name: "rhn_pass"
prompt: "Enter your password. (Required)"
private: yes
- name: "satellite_organization_id"
Expand All @@ -33,7 +33,7 @@
body_format: json
method: GET
user: "{{ sat_admin_user }}"
password: "{{ sat_admin_password }}"
password: "{{ rhn_pass }}"
status_code: [ 200, 201 ]
url: "https://{{ satellite_server }}/katello/api/systems?organization_id={{ satellite_organization_id | default(1) }}&per_page=5000"
validate_certs: no
Expand All @@ -52,7 +52,7 @@
body_format: json
method: DELETE
user: "{{ sat_admin_user }}"
password: "{{ sat_admin_password }}"
password: "{{ rhn_pass }}"
status_code: [ 200, 201, 204 ]
url: "https://{{ satellite_server }}/katello/api/systems/{{ item.uuid }}"
validate_certs: no
Expand Down
4 changes: 2 additions & 2 deletions ec2_content_hosts_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
prompt: "Enter your username. (Required, defaults to admin)"
default: "admin"
private: no
- name: "sat_admin_password"
- name: "rhn_pass"
prompt: "Enter your password. (Required)"
private: yes
- name: "satellite_organization_id"
Expand All @@ -33,7 +33,7 @@
body_format: json
method: GET
user: "{{ sat_admin_user }}"
password: "{{ sat_admin_password }}"
password: "{{ rhn_pass }}"
status_code: [ 200, 201 ]
url: "https://{{ satellite_server }}/katello/api/systems?organization_id={{ satellite_organization_id | default(1) }}&per_page=5000"
validate_certs: no
Expand Down
8 changes: 8 additions & 0 deletions group_vars/inventory.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[satellite]
satellite.example.com

[old_satellite]
satellite.example.com

[nodes]
# host.example.com organization=EXAMPLE activationkey=rhel_activation_key"
Empty file.
Loading