feat(core): change namespace
Some checks are pending
test / Linting (push) Waiting to run
test / Molecule tests (default, debian11) (push) Blocked by required conditions
test / Molecule tests (default, debian12) (push) Blocked by required conditions
test / Molecule tests (default, ubuntu2004) (push) Blocked by required conditions
test / Molecule tests (default, ubuntu2204) (push) Blocked by required conditions
test / Molecule tests (with_ssh_keys, debian11) (push) Blocked by required conditions
test / Molecule tests (with_ssh_keys, debian12) (push) Blocked by required conditions
test / Molecule tests (with_ssh_keys, ubuntu2004) (push) Blocked by required conditions
test / Molecule tests (with_ssh_keys, ubuntu2204) (push) Blocked by required conditions
Some checks are pending
test / Linting (push) Waiting to run
test / Molecule tests (default, debian11) (push) Blocked by required conditions
test / Molecule tests (default, debian12) (push) Blocked by required conditions
test / Molecule tests (default, ubuntu2004) (push) Blocked by required conditions
test / Molecule tests (default, ubuntu2204) (push) Blocked by required conditions
test / Molecule tests (with_ssh_keys, debian11) (push) Blocked by required conditions
test / Molecule tests (with_ssh_keys, debian12) (push) Blocked by required conditions
test / Molecule tests (with_ssh_keys, ubuntu2004) (push) Blocked by required conditions
test / Molecule tests (with_ssh_keys, ubuntu2204) (push) Blocked by required conditions
This commit is contained in:
parent
3f41dbee11
commit
652d621187
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -16,3 +16,5 @@ jobs:
|
|||||||
uses: ednxzu/galaxy-import-role@v1
|
uses: ednxzu/galaxy-import-role@v1
|
||||||
with:
|
with:
|
||||||
galaxy-api-key: ${{ secrets.GALAXY_API_TOKEN }}
|
galaxy-api-key: ${{ secrets.GALAXY_API_TOKEN }}
|
||||||
|
repository-owner: ednxzu
|
||||||
|
repository-name: provision_ansible_user
|
||||||
|
@ -80,7 +80,7 @@ Example Playbook
|
|||||||
# calling the role inside a playbook with either the default or group_vars/host_vars
|
# calling the role inside a playbook with either the default or group_vars/host_vars
|
||||||
- hosts: servers
|
- hosts: servers
|
||||||
roles:
|
roles:
|
||||||
- ednxzu.provision_ansible_user
|
- ednz_cloud.provision_ansible_user
|
||||||
```
|
```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@ -116,7 +116,7 @@ Example Playbook
|
|||||||
|
|
||||||
- name: "Provision ansible user"
|
- name: "Provision ansible user"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: ednxzu.provision_ansible_user
|
name: ednz_cloud.provision_ansible_user
|
||||||
vars:
|
vars:
|
||||||
provision_ansible_user_add_ssh_key: true
|
provision_ansible_user_add_ssh_key: true
|
||||||
provision_ansible_user_ssh_key: "{{ _keypair.public_key }}"
|
provision_ansible_user_ssh_key: "{{ _keypair.public_key }}"
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
# meta file for provision_ansible_user
|
# meta file for provision_ansible_user
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
namespace: 'ednxzu'
|
namespace: "ednz_cloud"
|
||||||
role_name: 'provision_ansible_user'
|
role_name: "provision_ansible_user"
|
||||||
author: 'Bertrand Lanson'
|
author: "Bertrand Lanson"
|
||||||
description: 'Deploy the ansible service user on debian-based distros.'
|
description: "Deploy the ansible service user on debian-based distros."
|
||||||
license: 'license (BSD, MIT)'
|
license: "license (BSD, MIT)"
|
||||||
min_ansible_version: '2.10'
|
min_ansible_version: "2.10"
|
||||||
platforms:
|
platforms:
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
versions:
|
versions:
|
||||||
@ -17,10 +17,10 @@ galaxy_info:
|
|||||||
- bullseye
|
- bullseye
|
||||||
- bookworm
|
- bookworm
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- 'ubuntu'
|
- "ubuntu"
|
||||||
- 'debian'
|
- "debian"
|
||||||
- 'ansible'
|
- "ansible"
|
||||||
- 'user'
|
- "user"
|
||||||
- 'provisioning'
|
- "provisioning"
|
||||||
|
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.provision_ansible_user"
|
- name: "Include ednz_cloud.provision_ansible_user"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "ednxzu.provision_ansible_user"
|
name: "ednz_cloud.provision_ansible_user"
|
||||||
|
@ -10,23 +10,23 @@
|
|||||||
ansible.builtin.getent:
|
ansible.builtin.getent:
|
||||||
database: passwd
|
database: passwd
|
||||||
key: ansible
|
key: ansible
|
||||||
register: ednxzu_ansible_user
|
register: ednz_cloud_ansible_user
|
||||||
|
|
||||||
- name: "Getent group ansible"
|
- name: "Getent group ansible"
|
||||||
ansible.builtin.getent:
|
ansible.builtin.getent:
|
||||||
database: group
|
database: group
|
||||||
key: ansible
|
key: ansible
|
||||||
register: ednxzu_ansible_group
|
register: ednz_cloud_ansible_group
|
||||||
|
|
||||||
- name: "Verify ansible user and group"
|
- name: "Verify ansible user and group"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- not ednxzu_ansible_user.failed
|
- not ednz_cloud_ansible_user.failed
|
||||||
- not ednxzu_ansible_group.failed
|
- not ednz_cloud_ansible_group.failed
|
||||||
- "'ansible' in ednxzu_ansible_user.ansible_facts.getent_passwd.keys()"
|
- "'ansible' in ednz_cloud_ansible_user.ansible_facts.getent_passwd.keys()"
|
||||||
- "'/opt/ansible' in ednxzu_ansible_user.ansible_facts.getent_passwd['ansible']"
|
- "'/opt/ansible' in ednz_cloud_ansible_user.ansible_facts.getent_passwd['ansible']"
|
||||||
- "'/bin/bash' in ednxzu_ansible_user.ansible_facts.getent_passwd['ansible']"
|
- "'/bin/bash' in ednz_cloud_ansible_user.ansible_facts.getent_passwd['ansible']"
|
||||||
- "'ansible' in ednxzu_ansible_group.ansible_facts.getent_group.keys()"
|
- "'ansible' in ednz_cloud_ansible_group.ansible_facts.getent_group.keys()"
|
||||||
|
|
||||||
- name: "Test: ansible sudo permissions"
|
- name: "Test: ansible sudo permissions"
|
||||||
block:
|
block:
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.provision_ansible_user"
|
- name: "Include ednz_cloud.provision_ansible_user"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "ednxzu.provision_ansible_user"
|
name: "ednz_cloud.provision_ansible_user"
|
||||||
|
@ -10,23 +10,23 @@
|
|||||||
ansible.builtin.getent:
|
ansible.builtin.getent:
|
||||||
database: passwd
|
database: passwd
|
||||||
key: ansible
|
key: ansible
|
||||||
register: ednxzu_ansible_user
|
register: ednz_cloud_ansible_user
|
||||||
|
|
||||||
- name: "Getent group ansible"
|
- name: "Getent group ansible"
|
||||||
ansible.builtin.getent:
|
ansible.builtin.getent:
|
||||||
database: group
|
database: group
|
||||||
key: ansible
|
key: ansible
|
||||||
register: ednxzu_ansible_group
|
register: ednz_cloud_ansible_group
|
||||||
|
|
||||||
- name: "Verify ansible user and group"
|
- name: "Verify ansible user and group"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- not ednxzu_ansible_user.failed
|
- not ednz_cloud_ansible_user.failed
|
||||||
- not ednxzu_ansible_group.failed
|
- not ednz_cloud_ansible_group.failed
|
||||||
- "'ansible' in ednxzu_ansible_user.ansible_facts.getent_passwd.keys()"
|
- "'ansible' in ednz_cloud_ansible_user.ansible_facts.getent_passwd.keys()"
|
||||||
- "'/opt/ansible' in ednxzu_ansible_user.ansible_facts.getent_passwd['ansible']"
|
- "'/opt/ansible' in ednz_cloud_ansible_user.ansible_facts.getent_passwd['ansible']"
|
||||||
- "'/bin/bash' in ednxzu_ansible_user.ansible_facts.getent_passwd['ansible']"
|
- "'/bin/bash' in ednz_cloud_ansible_user.ansible_facts.getent_passwd['ansible']"
|
||||||
- "'ansible' in ednxzu_ansible_group.ansible_facts.getent_group.keys()"
|
- "'ansible' in ednz_cloud_ansible_group.ansible_facts.getent_group.keys()"
|
||||||
|
|
||||||
- name: "Test: ansible sudo permissions"
|
- name: "Test: ansible sudo permissions"
|
||||||
block:
|
block:
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.provision_ansible_user"
|
- name: "Include ednz_cloud.provision_ansible_user"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "ednxzu.provision_ansible_user"
|
name: "ednz_cloud.provision_ansible_user"
|
||||||
|
@ -10,23 +10,23 @@
|
|||||||
ansible.builtin.getent:
|
ansible.builtin.getent:
|
||||||
database: passwd
|
database: passwd
|
||||||
key: ansible
|
key: ansible
|
||||||
register: ednxzu_ansible_user
|
register: ednz_cloud_ansible_user
|
||||||
|
|
||||||
- name: "Getent group ansible"
|
- name: "Getent group ansible"
|
||||||
ansible.builtin.getent:
|
ansible.builtin.getent:
|
||||||
database: group
|
database: group
|
||||||
key: ansible
|
key: ansible
|
||||||
register: ednxzu_ansible_group
|
register: ednz_cloud_ansible_group
|
||||||
|
|
||||||
- name: "Verify ansible user and group"
|
- name: "Verify ansible user and group"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- not ednxzu_ansible_user.failed
|
- not ednz_cloud_ansible_user.failed
|
||||||
- not ednxzu_ansible_group.failed
|
- not ednz_cloud_ansible_group.failed
|
||||||
- "'ansible' in ednxzu_ansible_user.ansible_facts.getent_passwd.keys()"
|
- "'ansible' in ednz_cloud_ansible_user.ansible_facts.getent_passwd.keys()"
|
||||||
- "'/opt/ansible' in ednxzu_ansible_user.ansible_facts.getent_passwd['ansible']"
|
- "'/opt/ansible' in ednz_cloud_ansible_user.ansible_facts.getent_passwd['ansible']"
|
||||||
- "'/bin/bash' in ednxzu_ansible_user.ansible_facts.getent_passwd['ansible']"
|
- "'/bin/bash' in ednz_cloud_ansible_user.ansible_facts.getent_passwd['ansible']"
|
||||||
- "'ansible' in ednxzu_ansible_group.ansible_facts.getent_group.keys()"
|
- "'ansible' in ednz_cloud_ansible_group.ansible_facts.getent_group.keys()"
|
||||||
|
|
||||||
- name: "Test: ansible sudo permissions"
|
- name: "Test: ansible sudo permissions"
|
||||||
block:
|
block:
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Include ednxzu.provision_ansible_user"
|
- name: "Include ednz_cloud.provision_ansible_user"
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "ednxzu.provision_ansible_user"
|
name: "ednz_cloud.provision_ansible_user"
|
||||||
|
@ -10,23 +10,23 @@
|
|||||||
ansible.builtin.getent:
|
ansible.builtin.getent:
|
||||||
database: passwd
|
database: passwd
|
||||||
key: ansible
|
key: ansible
|
||||||
register: ednxzu_ansible_user
|
register: ednz_cloud_ansible_user
|
||||||
|
|
||||||
- name: "Getent group ansible"
|
- name: "Getent group ansible"
|
||||||
ansible.builtin.getent:
|
ansible.builtin.getent:
|
||||||
database: group
|
database: group
|
||||||
key: ansible
|
key: ansible
|
||||||
register: ednxzu_ansible_group
|
register: ednz_cloud_ansible_group
|
||||||
|
|
||||||
- name: "Verify ansible user and group"
|
- name: "Verify ansible user and group"
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- not ednxzu_ansible_user.failed
|
- not ednz_cloud_ansible_user.failed
|
||||||
- not ednxzu_ansible_group.failed
|
- not ednz_cloud_ansible_group.failed
|
||||||
- "'ansible' in ednxzu_ansible_user.ansible_facts.getent_passwd.keys()"
|
- "'ansible' in ednz_cloud_ansible_user.ansible_facts.getent_passwd.keys()"
|
||||||
- "'/opt/ansible' in ednxzu_ansible_user.ansible_facts.getent_passwd['ansible']"
|
- "'/opt/ansible' in ednz_cloud_ansible_user.ansible_facts.getent_passwd['ansible']"
|
||||||
- "'/bin/bash' in ednxzu_ansible_user.ansible_facts.getent_passwd['ansible']"
|
- "'/bin/bash' in ednz_cloud_ansible_user.ansible_facts.getent_passwd['ansible']"
|
||||||
- "'ansible' in ednxzu_ansible_group.ansible_facts.getent_group.keys()"
|
- "'ansible' in ednz_cloud_ansible_group.ansible_facts.getent_group.keys()"
|
||||||
|
|
||||||
- name: "Test: ansible sudo permissions"
|
- name: "Test: ansible sudo permissions"
|
||||||
block:
|
block:
|
||||||
|
Loading…
Reference in New Issue
Block a user