Skip to content

Commit

Permalink
Merge pull request #381 from automationiberia/minor-fixes
Browse files Browse the repository at this point in the history
Changed path directory user filetree-read and change var drop_user_ex…
  • Loading branch information
ivarmu authored Oct 11, 2022
2 parents fa1b0b3 + cb7beee commit 05ee872
Show file tree
Hide file tree
Showing 97 changed files with 76 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
controller_user_accounts:
- username: "adminorg1"
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
34326232313533313332653164303739356639666566613232363234316333646630313830316639
6666613666393831356637353834343733626132336361300a333836633636356338383038623034
31633639323635333835393662346566303037633834313561666166653232376238623461626138
6163663536373538390a393763316538313133313363346466666264386334383638336133366465
3130
email: "[email protected]"
firstname: "adminorg1"
lastname: "adminorg1"
is_auditor: False
is_superuser: False

- username: "userorg1"
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
34326232313533313332653164303739356639666566613232363234316333646630313830316639
6666613666393831356637353834343733626132336361300a333836633636356338383038623034
31633639323635333835393662346566303037633834313561666166653232376238623461626138
6163663536373538390a393763316538313133313363346466666264386334383638336133366465
3130
email: "[email protected]"
is_superuser: False

...
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
controller_user_accounts:
- username: "adminorg2"
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
34326232313533313332653164303739356639666566613232363234316333646630313830316639
6666613666393831356637353834343733626132336361300a333836633636356338383038623034
31633639323635333835393662346566303037633834313561666166653232376238623461626138
6163663536373538390a393763316538313133313363346466666264386334383638336133366465
3130
email: "[email protected]"
firstname: "adminorg2"
lastname: "adminorg2"
is_auditor: False
is_superuser: False

- username: "userorg2"
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
34326232313533313332653164303739356639666566613232363234316333646630313830316639
6666613666393831356637353834343733626132336361300a333836633636356338383038623034
31633639323635333835393662346566303037633834313561666166653232376238623461626138
6163663536373538390a393763316538313133313363346466666264386334383638336133366465
3130
email: "[email protected]"
is_superuser: False
...
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
controller_user_accounts:
- username: "admin"
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
34326232313533313332653164303739356639666566613232363234316333646630313830316639
6666613666393831356637353834343733626132336361300a333836633636356338383038623034
31633639323635333835393662346566303037633834313561666166653232376238623461626138
6163663536373538390a393763316538313133313363346466666264386334383638336133366465
3130
email: "[email protected]"
firstname: "admin"
lastname: "admin"
is_auditor: False
is_superuser: True
update_secrets: False
...
2 changes: 1 addition & 1 deletion roles/filetree_read/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ controller_roles: []
filetree_controller_settings: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_settings.d/"
filetree_controller_organizations: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_organizations.d/"
filetree_controller_labels: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_labels.d/"
filetree_controller_user_accounts: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_users.d/"
filetree_controller_user_accounts: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_users.d/"
filetree_controller_teams: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_teams.d/"
filetree_controller_credential_types: "{{ dir_orgs_vars }}/{{ orgs }}/env/common/controller_credential_types.d/"
filetree_controller_credentials: "{{ dir_orgs_vars }}/{{ orgs }}/env/{{ env }}/controller_credentials.d/"
Expand Down
2 changes: 1 addition & 1 deletion roles/object_diff/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# defaults file for object_diff

# populate_controller_api_user_accounts_without_external_accounts
drop_user_external_accounts: true
drop_user_external_accounts: false

# Automation Controller Object Lists
controller_settings: []
Expand Down
6 changes: 2 additions & 4 deletions roles/object_diff/tasks/user_accounts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs)
}}"

- name: "OBJECT DIFF: Sets the current controller user to determine if it is super-admin"
- name: "OBJECT DIFF: Get all users from the API"
ansible.builtin.set_fact:
__controller_api_user_accounts: "{{ query(controller_api_plugin, 'users',
host=controller_hostname, oauth_token=controller_oauthtoken, verify_ssl=controller_validate_certs)
Expand All @@ -24,9 +24,7 @@
__controller_api_user_accounts: "{{ populate_controller_api_user_accounts_without_external_accounts }}"
when: populate_controller_api_user_accounts_without_external_accounts is defined

when:
- drop_user_external_accounts is defined
- drop_user_external_accounts
when: not drop_user_external_accounts

- name: "User account differences (block)"
block:
Expand Down

0 comments on commit 05ee872

Please sign in to comment.