diff --git a/ansible/bootstrap.yml b/ansible/bootstrap.yml index 40abdb1..76f1e75 100644 --- a/ansible/bootstrap.yml +++ b/ansible/bootstrap.yml @@ -1,5 +1,6 @@ - hosts: all become: yes + debugger: on_failed tasks: - name: Add the ansible group group: @@ -7,8 +8,6 @@ gid: 1100 state: present - - - name: Add the ansible user as a system user user: name: ansible @@ -18,7 +17,8 @@ # https://www.lisenet.com/2019/ansible-generate-crypted-passwords-for-the-user-module/ password: "{{ ansible_crypted_password | password_hash('sha512') }}" shell: /bin/bash - update_password: on_create + # Uncomment to prevent password reset + # update_password: on_create system: yes home: /srv/ansible state: present diff --git a/ansible/inventories/externals/static_inventory.yml b/ansible/inventories/externals/static_inventory.yml deleted file mode 100644 index 10e1973..0000000 --- a/ansible/inventories/externals/static_inventory.yml +++ /dev/null @@ -1,8 +0,0 @@ -all: - children: - rup: - hosts: - cloud.reterup.it - liquid - rup1 - rupfront \ No newline at end of file diff --git a/ansible/inventories/main-lab/group_vars/all/all.yml b/ansible/inventories/main-lab/group_vars/all/all.yml deleted file mode 100644 index d12e6a6..0000000 --- a/ansible/inventories/main-lab/group_vars/all/all.yml +++ /dev/null @@ -1 +0,0 @@ -ansible_user: ansible \ No newline at end of file diff --git a/ansible/inventories/main-lab/group_vars/all/vault.yml b/ansible/inventories/main-lab/group_vars/all/vault.yml deleted file mode 100644 index a6c2122..0000000 --- a/ansible/inventories/main-lab/group_vars/all/vault.yml +++ /dev/null @@ -1,9 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -39376138666334356631626564333933643938353065356235303636303064353263623831373036 -3461386536336466343665343639643730653838323939370a343737663839623962373065313932 -64623636646335616162633331613835613837336561666530623864346431363338653564323539 -3863656661653538390a623763636564383863643063353364366232663133326235353136626661 -31623736323938663561363562323832373939303637633337626132616530343731343037303062 -66376330613130323331363230626361383137393333326661343239613137386530666237393661 -38303330386663393334323735636637393262616664646536343865613431666234343566616661 -38323163383866353034 diff --git a/ansible/inventories/main-lab/host_vars/inspector.home.arpa.yml b/ansible/inventories/main-lab/host_vars/inspector.home.arpa.yml deleted file mode 100644 index 7166053..0000000 --- a/ansible/inventories/main-lab/host_vars/inspector.home.arpa.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -ansible_user: clouseau \ No newline at end of file diff --git a/ansible/inventories/main-lab/static_inventory.yaml b/ansible/inventories/main-lab/static_inventory.yaml deleted file mode 100644 index 68ff083..0000000 --- a/ansible/inventories/main-lab/static_inventory.yaml +++ /dev/null @@ -1,39 +0,0 @@ -all: - vars: - #ansible_network_os: community.network.ce - children: - lan: - hosts: - inspector.home.arpa: - god.home.arpa: - swarm: - children: - enabling: - hosts: - enabling[1:3].home.arpa: - swarm_master: true - swarm_drain: false - vars: - swarm_name: enabling - swarm1: - hosts: - swarm1m[1:3].home.arpa: - swarm_master: true - swarm1w[1:4].home.arpa: - vars: - swarm_name: the_swarm - cluster: - hosts: - worker[1:3].home.arpa: - front: - hosts: - edge.home.arpa: - labs: - hosts: - prox1.home.arpa: - operators: - children: - lan: - enabling: - - diff --git a/ansible/inventories/services/rup/site.yaml b/ansible/inventories/services/rup/site.yaml deleted file mode 100644 index bf539ca..0000000 --- a/ansible/inventories/services/rup/site.yaml +++ /dev/null @@ -1,3 +0,0 @@ -all: - children: - rupfront.home.arpa diff --git a/ansible/readme.md b/ansible/readme.md index c03391e..f553b28 100644 --- a/ansible/readme.md +++ b/ansible/readme.md @@ -1,11 +1,33 @@ # Ansible Playbooks +## Playbooks +##### Bootstrap +Creates user ansible with necessary privileges. Needs become password + +'ansible-playbook -i inventories bootstrap.yml -l nextrup_copy_test -u fabio -K --ask-vault-password' + +##### Nodes +Basic checks connectivity for **all** + + + + ## Inventories + ### Main Lab Main lab used for experimenting and development [check](main-lab) + ### Externals Management of extra infra nodes [check](non-infra) +### Production +Management of production services, beware! + +### Prox1_lab +Prox mox laboratory + + + ## TODO * K8s cluster * Ensure micro on operating nodes