Commit 76c700d5 authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

Remove Ansible includes.

Includes were deprecated and have been removed in recent Ansible
versions, in favor of import_tasks and include_tasks.

I replaced them for either of these, as it seemed appropriate.
parent 68257cb8
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
stat: path=/etc/re6stnet/re6stnet.conf stat: path=/etc/re6stnet/re6stnet.conf
register: re6stnet_conf register: re6stnet_conf
- include: sysctl.yml - import_tasks: sysctl.yml
- name: Update Facts - name: Update Facts
set_fact: set_fact:
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
copy: src=/etc/systemd/re6stnet.service dest=/etc/systemd/system/re6stnet.service copy: src=/etc/systemd/re6stnet.service dest=/etc/systemd/system/re6stnet.service
when: ansible_distribution == 'CentOS' and ansible_distribution_version >= '7' and re6stnet.stat.exists == True and re6stnode.stat.exists == False when: ansible_distribution == 'CentOS' and ansible_distribution_version >= '7' and re6stnet.stat.exists == True and re6stnode.stat.exists == False
- include: daemon.yml - import_tasks: daemon.yml
- name: Create centos 6 init.d missing file - name: Create centos 6 init.d missing file
copy: src=centos_6_init_d dest=/etc/init.d/re6stnet mode=755 copy: src=centos_6_init_d dest=/etc/init.d/re6stnet mode=755
...@@ -70,5 +70,5 @@ ...@@ -70,5 +70,5 @@
- name: Include re6stnet-ip6tables-check at reboot on cron - name: Include re6stnet-ip6tables-check at reboot on cron
cron: name="ip6tables at reboot" special_time=reboot job="sleep 20 && /usr/bin/re6stnet-ip6tables-check" cron: name="ip6tables at reboot" special_time=reboot job="sleep 20 && /usr/bin/re6stnet-ip6tables-check"
- include: tcp_nodelay.yml - import_tasks: tcp_nodelay.yml
- include: fedora_init.yml - import_tasks: fedora_init.yml
- include: debian_init.yml - import_tasks: debian_init.yml
- name: Force HTTP repository for old debian versions without HTTPS support - name: Force HTTP repository for old debian versions without HTTPS support
set_fact: set_fact:
......
--- ---
#- include: "{{ ansible_distribution |lower }}.yml" #- include_tasks: "{{ ansible_distribution |lower }}.yml"
- assert: { that: "ansible_distribution == 'Debian'" } - assert: { that: "ansible_distribution == 'Debian'" }
- include: debian.yml - import_tasks: debian.yml
#- command: "{{role_path}}/gen-ipcm-conf" #- command: "{{role_path}}/gen-ipcm-conf"
- command: roles/rina/gen-ipcm-conf - command: roles/rina/gen-ipcm-conf
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
register: pip3_installed register: pip3_installed
- name: Install slapcache on Debian < 9 - name: Install slapcache on Debian < 9
include: pip_installations_success.yml include_tasks: pip_installations_success.yml
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int < 9 when: ansible_distribution == "Debian" and ansible_distribution_major_version|int < 9
- name: Install slapcache on Debian >= 9 - name: Install slapcache on Debian >= 9
include: pip_installations_succeeded.yml include_tasks: pip_installations_succeeded.yml
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int >= 9 when: ansible_distribution == "Debian" and ansible_distribution_major_version|int >= 9
--- ---
- include: debian9-gcc-4.9.yml - import_tasks: debian9-gcc-4.9.yml
- name: Install iptables - name: Install iptables
apt: apt:
......
--- ---
- include: remove-slapos-package.yml - import_tasks: remove-slapos-package.yml
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
- shell: echo {{ ansible_date_time.epoch }} > /opt/upgrader/last-upgrade - shell: echo {{ ansible_date_time.epoch }} > /opt/upgrader/last-upgrade
when: (lookup('file', '/opt/upgrader/playbook-tmp/upgrade_after')|int > lookup('file', '/opt/upgrader/last-upgrade')|int ) when: (lookup('file', '/opt/upgrader/playbook-tmp/upgrade_after')|int > lookup('file', '/opt/upgrader/last-upgrade')|int )
- include: remove-legacy.yml - import_tasks: remove-legacy.yml
- name: Setting playbook report message - name: Setting playbook report message
set_fact: playbook_report_message="Successfully ran playbook" playbook_report_progress="100" set_fact: playbook_report_message="Successfully ran playbook" playbook_report_progress="100"
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
- name: Allow ping for all users (no need for SUID binary) - name: Allow ping for all users (no need for SUID binary)
sysctl: name="net.ipv4.ping_group_range" value="0 2147483647" sysctl_set=yes state=present reload=yes sysctl: name="net.ipv4.ping_group_range" value="0 2147483647" sysctl_set=yes state=present reload=yes
- include: kvm.yml - import_tasks: kvm.yml
- include: shuttle-modprobe.yml - import_tasks: shuttle-modprobe.yml
- name: Increase ulimit - name: Increase ulimit
copy: src="slapos_limit.conf" dest="/etc/security/limits.d/slapos.conf" mode=0644 owner=root group=root copy: src="slapos_limit.conf" dest="/etc/security/limits.d/slapos.conf" mode=0644 owner=root group=root
......
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
- name: echo 1 > /sys/kernel/mm/ksm/run - name: echo 1 > /sys/kernel/mm/ksm/run
shell: echo 1 > /sys/kernel/mm/ksm/run shell: echo 1 > /sys/kernel/mm/ksm/run
- include: user.yml - import_tasks: user.yml
- include: uploadlog.yml - import_tasks: uploadlog.yml
- include: rerun.yml - import_tasks: rerun.yml
- name: Create /etc/opt dir - name: Create /etc/opt dir
file: dest=/etc/opt mode=775 state=directory file: dest=/etc/opt mode=775 state=directory
...@@ -39,10 +39,10 @@ ...@@ -39,10 +39,10 @@
ignore_errors: True ignore_errors: True
register: upgrade_needed register: upgrade_needed
- include: network.yml - import_tasks: network.yml
- include: hostname.yml - import_tasks: hostname.yml
- include: user.yml - import_tasks: user.yml
- include: ssh.yml - import_tasks: ssh.yml
- name: Enable hotplugged CPU and Memory automatically - name: Enable hotplugged CPU and Memory automatically
lineinfile: dest=/etc/udev/rules.d/99-hotplug-cpu-mem.rules state=present create=yes line="{{ item }}" lineinfile: dest=/etc/udev/rules.d/99-hotplug-cpu-mem.rules state=present create=yes line="{{ item }}"
...@@ -60,5 +60,5 @@ ...@@ -60,5 +60,5 @@
shell: echo 1 > /opt/upgrader/last-upgrade shell: echo 1 > /opt/upgrader/last-upgrade
when: last_upgrade.stat.exists == False when: last_upgrade.stat.exists == False
- include: upgrader.yml upgrade_after={{ upgrade_needed.content }} - include_tasks: upgrader.yml upgrade_after={{ upgrade_needed.content }}
when: upgrade_needed.status in [200, 304] and (upgrade_needed.content|int > lookup('file', '/opt/upgrader/last-upgrade')|int) when: upgrade_needed.status in [200, 304] and (upgrade_needed.content|int > lookup('file', '/opt/upgrader/last-upgrade')|int)
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
apt: name=sudo state=latest update_cache=yes cache_valid_time=86400 apt: name=sudo state=latest update_cache=yes cache_valid_time=86400
when: ansible_os_family == "Debian" when: ansible_os_family == "Debian"
- include: ../../yum/tasks/main.yml name=sudo cache_valid_time=86400 - include_tasks: ../../yum/tasks/main.yml name=sudo cache_valid_time=86400
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"
- name: Ensure /etc/sudoers.d directory is present - name: Ensure /etc/sudoers.d directory is present
......
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