This commit is contained in:
Gilles Mouchet 2024-06-02 12:27:39 +02:00
parent f64840e5f1
commit 7f7f7f1541
5 changed files with 20 additions and 5 deletions

View File

@ -6,4 +6,4 @@
line: '{{ item }}'
state: present
with_items:
- '{{ ansible_default_ipv4.address }} {{ ansible_hostname }} {{ ansible_hostname }}.gmotech.net'
- '{{ ansible_default_ipv4.address }} {{ ansible_hostname }} {{ ansible_hostname }}.gmetech.net'

View File

@ -147,6 +147,14 @@ printInfo "Update date and time"
if [ $? -ne 0 ]; then printError "Problem to update date and time";exit; fi
printSuccess "Date and Time updated successfully"
#-----------------------------------------------------------------------------
# update role
#-----------------------------------------------------------------------------
printInfo "Update roles"
~/.local/bin/ansible-galaxy install -f -r roles/requirements.yml
if [ $? -ne 0 ]; then printError "Problem to update roles";exit; fi
printSuccess "Role updated successfully"
#-----------------------------------------------------------------------------
# execute playbook
#-----------------------------------------------------------------------------

View File

@ -8,3 +8,7 @@
- include_tasks: inst-packages.yml
- include_tasks: misc.yml
- name: import netdata role
import_role:
name: role-netdata

View File

@ -16,10 +16,6 @@
copy:
src: chrony/chronyd
dest: /etc/sysconfig/chronyd
#replace:
# path: /etc/sysconfig/chronyd
# regexp: '^OPTIONS=""'
# replace: 'OPTIONS="-4"'
- name: start and active service chronyd
systemd:

7
roles/requirements.yml Normal file
View File

@ -0,0 +1,7 @@
---
- name: role-netdata
src: git+https://gitweb.dyndns.org/awx/role_netdata.git
- name: role-apache
src: git+https://gitweb.dyndns.org/awx/role-apache.git