diff --git a/ansible/playbooks/adhoc-ipadns.yml b/ansible/playbooks/adhoc-ipadns.yml new file mode 100644 index 0000000..3d35b06 --- /dev/null +++ b/ansible/playbooks/adhoc-ipadns.yml @@ -0,0 +1,27 @@ +--- +# This playbook is meant to be used with callable variables, like adhoc or AWX. +# What: Creates dns zones in the idm infrastructure based on the variables +# provided. + +- name: Create a DNS Zone + hosts: ipaserver + become: false + gather_facts: false + vars_files: + - vars/encpass.yml + + tasks: + - name: "Checking for user variables" + assert: + that: + - ipaadmin_password | mandatory + - ipa_zone | mandatory + success_msg: "Required variables provided" + fail_msg: "We are missing zone information or ipa admin password" + + - name: "Creating DNS Zone" + freeipa.ansible_freeipa.ipadnszone: + ipaadmin_password: "{{ ipaadmin_password }}" + name: "{{ ipa_zone }}" + tags: + - dns diff --git a/ansible/playbooks/adhoc-ipagroups.yml b/ansible/playbooks/adhoc-ipagroups.yml index 0615baa..ec3af08 100644 --- a/ansible/playbooks/adhoc-ipagroups.yml +++ b/ansible/playbooks/adhoc-ipagroups.yml @@ -14,17 +14,17 @@ assert: that: - ipaadmin_password | mandatory - - ipaGroup | mandatory - - ipaDescription | mandatory - - ipaPosix | mandatory + - ipa_group | mandatory + - ipa_description | mandatory + - ipa_posix | mandatory success_msg: "Required variables provided" fail_msg: "We are missing group information or ipa admin password" - name: "Creating Mandatory Groups" freeipa.ansible_freeipa.ipagroup: ipaadmin_password: "{{ ipaadmin_password }}" - name: "{{ ipaGroup }}" - description: "{{ ipaDescription }}" - nonposix: "{{ ipaPosix }}" + name: "{{ ipa_group }}" + description: "{{ ipa_description }}" + nonposix: "{{ ipa_posix }}" tags: - groups diff --git a/ansible/playbooks/adhoc-ipausers.yml b/ansible/playbooks/adhoc-ipausers.yml index 1346302..b85e430 100644 --- a/ansible/playbooks/adhoc-ipausers.yml +++ b/ansible/playbooks/adhoc-ipausers.yml @@ -14,25 +14,25 @@ assert: that: - ipaadmin_password | mandatory - - ipaName | mandatory - - ipaFirst | mandatory - - ipaLast | mandatory - - ipaEmail | mandatory - - ipaPassword | mandatory - - ipaTitle | mandatory + - ipa_name | mandatory + - ipa_first | mandatory + - ipa_last | mandatory + - ipa_email | mandatory + - ipa_password | mandatory + - ipa_title | mandatory success_msg: "Required variables provided" fail_msg: "We are missing user information or ipa admin password" - name: "Creating User Account" freeipa.ansible_freeipa.ipauser: ipaadmin_password: "{{ ipaadmin_password }}" - name: "{{ ipaName }}" - first: "{{ ipaFirst }}" - last: "{{ ipaLast }}" - email: "{{ ipaEmail }}" - password: "{{ ipaPassword }}" - title: "{{ ipaTitle }}" - loginshell: "{{ ipaLoginshell|default('/sbin/nologin', True) }}" + name: "{{ ipa_name }}" + first: "{{ ipa_first }}" + last: "{{ ipa_last }}" + email: "{{ ipa_email }}" + password: "{{ ipa_password }}" + title: "{{ ipa_title }}" + loginshell: "{{ ipa_loginshell|default('/sbin/nologin', True) }}" update_password: on_create tags: - users diff --git a/ansible/roles/requirements.yml b/ansible/roles/requirements.yml index 2b1d2b8..3baf6c8 100644 --- a/ansible/roles/requirements.yml +++ b/ansible/roles/requirements.yml @@ -16,8 +16,8 @@ roles: - name: rockylinux.kojihub src: https://github.com/rocky-linux/ansible-role-kojihub version: main - - name: rockylinux.mqtt - src: https://github.com/rocky-linux/ansible-role-mqtt + - name: rockylinux.rabbitmq + src: https://github.com/rocky-linux/ansible-role-rabbitmq version: main collections: @@ -29,3 +29,4 @@ collections: - name: community.rabbitmq - name: ansible.posix - name: ktdreyer.koji_ansible + - name: netbox.netbox