Replace become: true notation
Ansible documentation recommends to use yes/no as boolean value, the last mention of possible using true/yes related to version 2.4 [1]. Starting from version 2.5 only become: yes specified in docs [2][3]. Since we have both variations, this patch aligns become statement to use only yes value. [1] https://docs.ansible.com/ansible/2.4/become.html [2] https://docs.ansible.com/ansible/2.5/user_guide/become.html [3] https://docs.ansible.com/ansible/latest/user_guide/become.html Change-Id: I706e6e1b9d706d6bfcc38c1a3d0d7304575946ce Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This commit is contained in:
parent
4e64e74b6f
commit
76d8716968
@ -29,7 +29,7 @@
|
||||
state: directory
|
||||
mode: "0755"
|
||||
owner: "{{ ansible_user }}"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: deploy-gate
|
||||
include_role:
|
||||
|
@ -25,15 +25,15 @@
|
||||
args:
|
||||
executable: /bin/bash
|
||||
ignore_errors: True
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: copy configs
|
||||
command: "cp -r /etc/apache2 {{ apache_log_dir }}/configs"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: copy logs
|
||||
command: "cp -r /var/log/apache2 {{ apache_log_dir }}/logs"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: Change ownership of the logs dir
|
||||
file:
|
||||
@ -41,7 +41,7 @@
|
||||
recurse: true
|
||||
owner: "{{ ansible_user }}"
|
||||
path: "{{ apache_log_dir }}"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: "Downloads logs to executor"
|
||||
synchronize:
|
||||
|
@ -25,11 +25,11 @@
|
||||
|
||||
- name: copy hypervisor logs to tmp directory
|
||||
command: "cp -r /var/log/libvirt {{ libvirt_log_dir }}/libvirt-hypervisor"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: copy console logs to tmp directory
|
||||
command: "cp -r /var/log/libvirt-consoles/ {{ libvirt_log_dir }}/libvirt-consoles"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: ensure libvirt resource dump directories exist
|
||||
file:
|
||||
@ -102,7 +102,7 @@
|
||||
recurse: true
|
||||
owner: "{{ ansible_user }}"
|
||||
path: "{{ libvirt_log_dir }}"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: Downloads logs to executor
|
||||
synchronize:
|
||||
|
@ -28,7 +28,7 @@
|
||||
when: ansible_facts.services['docker.service'] is defined
|
||||
args:
|
||||
executable: /bin/bash
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: dump containerd logs
|
||||
shell: |-
|
||||
@ -36,7 +36,7 @@
|
||||
when: ansible_facts.services['containerd.service'] is defined
|
||||
args:
|
||||
executable: /bin/bash
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: "Downloads logs to executor"
|
||||
synchronize:
|
||||
|
@ -16,7 +16,7 @@
|
||||
state: directory
|
||||
mode: "0755"
|
||||
owner: "{{ ansible_user }}"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: build ephemeral node iso
|
||||
command: airshipctl baremetal isogen
|
||||
|
@ -17,7 +17,7 @@
|
||||
msg: "Only Debian|Ubuntu are currently supported"
|
||||
|
||||
- name: Confguring file-exchanger
|
||||
become: true
|
||||
become: yes
|
||||
block:
|
||||
|
||||
- name: Ensure backend
|
||||
|
@ -16,16 +16,16 @@
|
||||
service:
|
||||
name: "apache2"
|
||||
state: "restarted"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: reload apache2
|
||||
service:
|
||||
name: "apache2"
|
||||
state: "reloaded"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: "restart httpd"
|
||||
service:
|
||||
name: "httpd"
|
||||
state: "restarted"
|
||||
become: true
|
||||
become: yes
|
||||
|
@ -11,7 +11,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Generate htaccess file
|
||||
become: true
|
||||
become: yes
|
||||
template:
|
||||
src: htaccess.j2
|
||||
dest: "{{ apache_server_htaccess_path }}"
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
- name: Confguring htpasswd
|
||||
become: true
|
||||
become: yes
|
||||
block:
|
||||
- name: Ensure needed packages
|
||||
apt:
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
---
|
||||
- name: redhat | ensuring apache packages are present
|
||||
become: true
|
||||
become: yes
|
||||
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
|
||||
yum:
|
||||
name:
|
||||
@ -21,7 +21,7 @@
|
||||
state: present
|
||||
|
||||
- name: ubuntu | ensuring apache packages are present
|
||||
become: true
|
||||
become: yes
|
||||
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||
apt:
|
||||
name:
|
||||
@ -30,25 +30,25 @@
|
||||
state: present
|
||||
|
||||
- name: Disable default virtual host
|
||||
become: true
|
||||
become: yes
|
||||
command: a2dissite 000-default
|
||||
|
||||
- name: Enable ssl module
|
||||
become: true
|
||||
become: yes
|
||||
command: a2enmod headers ssl
|
||||
|
||||
- name: Add ssl configuration
|
||||
become: true
|
||||
become: yes
|
||||
template:
|
||||
src: ssl-params.conf.j2
|
||||
dest: /etc/apache2/conf-available/ssl-params.conf
|
||||
|
||||
- name: Enable ssl configuration
|
||||
become: true
|
||||
become: yes
|
||||
command: a2enconf ssl-params
|
||||
|
||||
- name: redhat | enabling apache on boot and starting
|
||||
become: true
|
||||
become: yes
|
||||
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
|
||||
service:
|
||||
name: httpd
|
||||
@ -56,7 +56,7 @@
|
||||
enabled: true
|
||||
|
||||
- name: Reload apache2 service
|
||||
become: true
|
||||
become: yes
|
||||
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||
service:
|
||||
name: apache2
|
||||
|
@ -11,7 +11,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Reload apache2 service
|
||||
become: true
|
||||
become: yes
|
||||
service:
|
||||
name: apache2
|
||||
state: reloaded
|
||||
|
@ -11,7 +11,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Generating ssl key & certificate
|
||||
become: true
|
||||
become: yes
|
||||
block:
|
||||
- name: Ensure needed packages
|
||||
apt:
|
||||
|
@ -16,7 +16,7 @@
|
||||
msg: "Only Debian|Ubuntu are currently supported"
|
||||
|
||||
- name: Preparing wsgi module for sushy-emulator
|
||||
become: true
|
||||
become: yes
|
||||
block:
|
||||
|
||||
- name: Ensure Apache
|
||||
|
@ -17,7 +17,7 @@
|
||||
msg: "Only Debian|Ubuntu are currently supported"
|
||||
|
||||
- name: Confguring sushy-emulator frontend
|
||||
become: true
|
||||
become: yes
|
||||
block:
|
||||
- name: Ensure sushy-emulator backend
|
||||
include_role:
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
---
|
||||
- name: Ensuring docker and support packages are present
|
||||
become: true
|
||||
become: yes
|
||||
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
|
||||
yum:
|
||||
name:
|
||||
@ -22,7 +22,7 @@
|
||||
state: present
|
||||
|
||||
- name: Ensuring docker and support packages are present
|
||||
become: true
|
||||
become: yes
|
||||
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||
apt:
|
||||
name:
|
||||
@ -37,7 +37,7 @@
|
||||
state: present
|
||||
|
||||
- name: Add user "{{ ansible_user }}" to docker group
|
||||
become: true
|
||||
become: yes
|
||||
user:
|
||||
name: "{{ ansible_user }}"
|
||||
groups:
|
||||
@ -60,23 +60,23 @@
|
||||
src: http-proxy-conf.j2
|
||||
dest: /etc/systemd/system/docker.service.d/http-proxy.conf
|
||||
when: proxy.enabled|bool == true
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: Create docker directory
|
||||
file:
|
||||
path: "{{ docker_config_path }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: Save docker daemon configuration
|
||||
copy:
|
||||
content: "{{ docker_config | to_nice_json }}"
|
||||
dest: "{{ docker_config_path }}/daemon.json"
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
- name: Start docker
|
||||
become: true
|
||||
become: yes
|
||||
systemd:
|
||||
name: docker
|
||||
state: restarted
|
||||
@ -84,7 +84,7 @@
|
||||
enabled: true
|
||||
|
||||
- name: Change group ownership on docker sock
|
||||
become: true
|
||||
become: yes
|
||||
file:
|
||||
path: /var/run/docker.sock
|
||||
group: docker
|
||||
|
@ -16,7 +16,7 @@
|
||||
- name: Load the kvm kernel module
|
||||
modprobe:
|
||||
name: kvm
|
||||
become: true
|
||||
become: yes
|
||||
failed_when: false
|
||||
|
||||
- name: Check for the KVM device
|
||||
|
@ -17,7 +17,7 @@
|
||||
state: directory
|
||||
recurse: true
|
||||
mode: 0770
|
||||
become: true
|
||||
become: yes
|
||||
when: "libvirt_domain.console_log_enabled | default(false)"
|
||||
|
||||
- name: Validate VM interfaces
|
||||
|
@ -11,7 +11,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: configure libvirt
|
||||
become: true
|
||||
become: yes
|
||||
block:
|
||||
- name: Set libvirt security driver
|
||||
lineinfile:
|
||||
|
@ -13,7 +13,7 @@
|
||||
---
|
||||
- block:
|
||||
- name: Ensuring Libvirt, Qemu and support packages are present
|
||||
become: true
|
||||
become: yes
|
||||
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
|
||||
yum:
|
||||
name:
|
||||
@ -24,7 +24,7 @@
|
||||
- qemu-kvm
|
||||
state: present
|
||||
- name: Ensuring Libvirt, Qemu and support packages are present
|
||||
become: true
|
||||
become: yes
|
||||
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||
apt:
|
||||
name:
|
||||
@ -38,7 +38,7 @@
|
||||
- ebtables
|
||||
state: present
|
||||
- name: Add user "{{ ansible_user }}" to libvirt group
|
||||
become: true
|
||||
become: yes
|
||||
user:
|
||||
name: "{{ ansible_user }}"
|
||||
groups:
|
||||
@ -52,5 +52,5 @@
|
||||
name: libvirtd
|
||||
state: started
|
||||
enabled: true
|
||||
become: true
|
||||
become: yes
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
name:
|
||||
- bridge-utils
|
||||
state: present
|
||||
become: true
|
||||
become: yes
|
||||
- name: gather network info
|
||||
virt_net:
|
||||
command: info
|
||||
@ -94,7 +94,7 @@
|
||||
|
||||
- name: Create virtual ethernet interface
|
||||
command: ip link add name air02 type veth peer name air01
|
||||
become: true
|
||||
become: yes
|
||||
changed_when:
|
||||
- "create_veth_command.rc != 2"
|
||||
- "'RTNETLINK answers: File exists' not in (create_veth_command.stderr | default(''))"
|
||||
@ -103,14 +103,14 @@
|
||||
- "create_veth_command.rc != 0"
|
||||
- "'RTNETLINK answers: File exists' not in (create_veth_command.stderr | default(''))"
|
||||
- name: set interface up
|
||||
become: true
|
||||
become: yes
|
||||
command: ip link set up dev air02
|
||||
# This makes task never report to be changed, it is a workaround
|
||||
# because if device is already up there is no command output or different RC
|
||||
changed_when: false
|
||||
|
||||
- name: set interface up
|
||||
become: true
|
||||
become: yes
|
||||
command: ip link set up dev air01
|
||||
# This makes task never report to be changed, it is a workaround
|
||||
# because if device is already up there is no command output or different RC
|
||||
@ -121,7 +121,7 @@
|
||||
already_in_bridge: device air02 is already a member of a bridge; can't enslave it to bridge oob-net.
|
||||
|
||||
- name: Add interface to libvirt managed linux bridge with dhcp
|
||||
become: true
|
||||
become: yes
|
||||
command: brctl addif oob-net air02
|
||||
changed_when:
|
||||
- add_if_command.rc != 1
|
||||
@ -132,7 +132,7 @@
|
||||
register: add_if_command
|
||||
|
||||
- name: send dhcp request over the interface
|
||||
become: true
|
||||
become: yes
|
||||
command: timeout 20s dhclient air01
|
||||
changed_when: false
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user