Skip to content

Commit

Permalink
apply branding
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Jul 10, 2023
1 parent 5c6dcb8 commit 11eefb8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions roles/locations/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions roles/locations/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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 }}"
loop: "{{ satellite_locations }}"
8 changes: 4 additions & 4 deletions tests/test_playbooks/locations_role.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- hosts: localhost
collections:
- theforeman.foreman
- redhat.satellite
gather_facts: false
vars_files:
- vars/server.yml
Expand All @@ -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
Expand Down

0 comments on commit 11eefb8

Please sign in to comment.