diff --git a/roles/locations/README.md b/roles/locations/README.md index 61f2d715..bb018365 100644 --- a/roles/locations/README.md +++ b/roles/locations/README.md @@ -1,14 +1,14 @@ -theforeman.foreman.locations +redhat.satellite.locations =================================== -This role creates and manages Foreman locations. +This role creates and manages locations. Role Variables -------------- This role supports the [Common Role Variables](https://github.com/theforeman/foreman-ansible-modules/blob/develop/README.md#common-role-variables). -The main data structure for this role is the list of `foreman_locations`. Each `location` requires the following fields: +The main data structure for this role is the list of `satellite_locations`. Each `location` requires the following fields: - `name`: The name of the location. @@ -22,12 +22,12 @@ Create the 'UK' location and set its parent to EMEA. ```yaml - hosts: localhost roles: - - role: theforeman.foreman.locations + - role: redhat.satellite.locations vars: - foreman_server_url: https://foreman.example.com - foreman_username: "admin" - foreman_password: "changeme" - foreman_locations: + satellite_server_url: https://satellite.example.com + satellite_username: "admin" + satellite_password: "changeme" + satellite_locations: - name: UK organisations: - RedHat diff --git a/roles/locations/tasks/main.yml b/roles/locations/tasks/main.yml index d81ed2e4..597ff6e3 100644 --- a/roles/locations/tasks/main.yml +++ b/roles/locations/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: Create locations # noqa: args[module] - theforeman.foreman.location: - username: "{{ foreman_username | default(omit) }}" - password: "{{ foreman_password | default(omit) }}" - server_url: "{{ foreman_server_url | default(omit) }}" - validate_certs: "{{ foreman_validate_certs | default(omit) }}" + redhat.satellite.location: + username: "{{ satellite_username | default(omit) }}" + password: "{{ satellite_password | default(omit) }}" + server_url: "{{ satellite_server_url | default(omit) }}" + validate_certs: "{{ satellite_validate_certs | default(omit) }}" name: "{{ item.name }}" parent: "{{ item.parent | default(omit) }}" organizations: "{{ item.organizations | default(omit) }}" parameters: "{{ item.parameters | default(omit) }}" ignore_types: "{{ item.ignore_types | default(omit) }}" - loop: "{{ foreman_locations }}" \ No newline at end of file + loop: "{{ satellite_locations }}" \ No newline at end of file diff --git a/tests/test_playbooks/locations_role.yml b/tests/test_playbooks/locations_role.yml index af8b1e30..585234bf 100644 --- a/tests/test_playbooks/locations_role.yml +++ b/tests/test_playbooks/locations_role.yml @@ -1,7 +1,7 @@ --- - hosts: localhost collections: - - theforeman.foreman + - redhat.satellite gather_facts: false vars_files: - vars/server.yml @@ -17,21 +17,21 @@ - hosts: tests collections: - - theforeman.foreman + - redhat.satellite gather_facts: false vars_files: - vars/server.yml roles: - role: locations vars: - foreman_locations: + satellite_locations: - name: "Test Location 1" - name: "Test Location 2" description: "2nd location" - hosts: localhost collections: - - theforeman.foreman + - redhat.satellite gather_facts: false vars_files: - vars/server.yml