update
This commit is contained in:
parent
f64840e5f1
commit
7f7f7f1541
@ -6,4 +6,4 @@
|
|||||||
line: '{{ item }}'
|
line: '{{ item }}'
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- '{{ ansible_default_ipv4.address }} {{ ansible_hostname }} {{ ansible_hostname }}.gmotech.net'
|
- '{{ ansible_default_ipv4.address }} {{ ansible_hostname }} {{ ansible_hostname }}.gmetech.net'
|
||||||
@ -147,6 +147,14 @@ printInfo "Update date and time"
|
|||||||
if [ $? -ne 0 ]; then printError "Problem to update date and time";exit; fi
|
if [ $? -ne 0 ]; then printError "Problem to update date and time";exit; fi
|
||||||
printSuccess "Date and Time updated successfully"
|
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
|
# execute playbook
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
4
main.yml
4
main.yml
@ -8,3 +8,7 @@
|
|||||||
- include_tasks: inst-packages.yml
|
- include_tasks: inst-packages.yml
|
||||||
- include_tasks: misc.yml
|
- include_tasks: misc.yml
|
||||||
|
|
||||||
|
- name: import netdata role
|
||||||
|
import_role:
|
||||||
|
name: role-netdata
|
||||||
|
|
||||||
@ -16,10 +16,6 @@
|
|||||||
copy:
|
copy:
|
||||||
src: chrony/chronyd
|
src: chrony/chronyd
|
||||||
dest: /etc/sysconfig/chronyd
|
dest: /etc/sysconfig/chronyd
|
||||||
#replace:
|
|
||||||
# path: /etc/sysconfig/chronyd
|
|
||||||
# regexp: '^OPTIONS=""'
|
|
||||||
# replace: 'OPTIONS="-4"'
|
|
||||||
|
|
||||||
- name: start and active service chronyd
|
- name: start and active service chronyd
|
||||||
systemd:
|
systemd:
|
||||||
|
|||||||
7
roles/requirements.yml
Normal file
7
roles/requirements.yml
Normal 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
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user