Commit 3ea9f0d9 authored by Alain Takoudjou's avatar Alain Takoudjou

playbook vm-bootstrap: fix warning messages on deprecated bare vars and shell usage in some tasks

parent d2a2521b
Pipeline #1982 skipped
......@@ -2,6 +2,18 @@
hosts: 127.0.0.1
connection: local
vars:
logrotate_args:
- name: vm-bootstrap
path: /var/log/vm-bootstrap.log
options:
- weekly
- compress
- rotate 5
- notifempty
- create
- dateext
roles:
- { role: vm-bootstrap, startup_playbook_id: imt-vm-bootstrap.yml }
- ntp
......@@ -26,14 +38,5 @@
- { role: vm-disks, vd_disk: t, data_n: 12 }
- { role: vm-disks, vd_disk: u, data_n: 12 }
- role: logrotate
logrotate_scripts:
- name: vm-bootstrap
path: /var/log/vm-bootstrap.log
options:
- weekly
- compress
- rotate 5
- notifempty
- create
- dateext
logrotate_scripts: "{{logrotate_args}}"
......@@ -6,5 +6,5 @@
template:
src: logrotate.d.j2
dest: /etc/logrotate.d/{{ item.name }}
with_items: logrotate_scripts
with_items: "{{logrotate_scripts}}"
when: logrotate_scripts is defined
......@@ -37,7 +37,7 @@
when: hostname_file.stat.exists == True
- name: setting cluster
shell: wget --no-check-certificate "{{ lookup('file', '/etc/opt/cluster.hash') }}/hosts" -O /tmp/hosts
get_url: url={{ lookup('file', '/etc/opt/cluster.hash') }}/hosts dest=/tmp/hosts validate_certs=no
when: cluster_hash.stat.exists == True
- name: stat /tmp/hosts
......
......@@ -51,7 +51,7 @@
- include: sudo.yml
- include: ssh.yml
- shell: mkdir -p /opt/upgrader
- file: path=/opt/upgrader state=directory
- stat: path=/opt/upgrader/last-upgrade
register: last_upgrade
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment