Fix all tasks to not use old action: statements.
This commit is contained in:
parent
ba75919326
commit
4cafc2bd37
|
@ -17,23 +17,23 @@
|
|||
- packages
|
||||
|
||||
- name: put step-tickers in place
|
||||
action: copy src="{{ files }}/common/step-tickers" dest=/etc/ntp/step-tickers
|
||||
copy: src="{{ files }}/common/step-tickers" dest=/etc/ntp/step-tickers
|
||||
when: ansible_cmdline.ostree is not defined
|
||||
tags:
|
||||
- ntp
|
||||
- config
|
||||
|
||||
- name: enable the service
|
||||
action: service name=ntpd state=running enabled=true
|
||||
service: name=ntpd state=running enabled=true
|
||||
when: ansible_cmdline.ostree is not defined
|
||||
|
||||
#- name: edit hostname to be instance name - prefix hostbase var if it exists
|
||||
# action: shell hostname {{ hostbase }}`curl -s http://169.254.169.254/latest/meta-data/instance-id`
|
||||
# shell: hostname {{ hostbase }}`curl -s http://169.254.169.254/latest/meta-data/instance-id`
|
||||
# tags:
|
||||
# - config
|
||||
|
||||
- name: add ansible root key
|
||||
action: authorized_key user=root key="{{ item }}"
|
||||
authorized_key: user=root key="{{ item }}"
|
||||
with_file:
|
||||
- /srv/web/infra/ansible/roles/base/files/ansible-pub-key
|
||||
tags:
|
||||
|
@ -49,12 +49,12 @@
|
|||
ignore_errors: true
|
||||
|
||||
- name: enable ssh_sysadm_login sebool
|
||||
action: seboolean name=ssh_sysadm_login state=yes persistent=yes
|
||||
seboolean: name=ssh_sysadm_login state=yes persistent=yes
|
||||
ignore_errors: true
|
||||
|
||||
# note - kinda should be a handler - but handlers need args
|
||||
- name: restorecon
|
||||
action: command restorecon -R /root/.ssh
|
||||
command: restorecon -R /root/.ssh
|
||||
tags:
|
||||
- config
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
|
||||
- name: Install common scripts
|
||||
action: copy src={{ item }} dest=/usr/local/bin/ owner=root group=root mode=0755
|
||||
copy: src={{ item }} dest=/usr/local/bin/ owner=root group=root mode=0755
|
||||
with_fileglob:
|
||||
-"{{ files }}/common-scripts/*"
|
||||
tags:
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
- name: add infra repo
|
||||
action: get_url url=http://infrastructure.fedoraproject.org/el/infrastructure.repo dest=/etc/yum.repos.d/
|
||||
get_url: url=http://infrastructure.fedoraproject.org/el/infrastructure.repo dest=/etc/yum.repos.d/
|
||||
when: is_rhel is defined
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: install cloud-utils
|
||||
action: yum name=cloud-utils state=present
|
||||
yum: name=cloud-utils state=present
|
||||
tags:
|
||||
- packages
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: add infra repo
|
||||
action: get_url url=http://infrastructure.fedoraproject.org/el/infrastructure.repo dest=/etc/yum.repos.d/
|
||||
get_url: url=http://infrastructure.fedoraproject.org/el/infrastructure.repo dest=/etc/yum.repos.d/
|
||||
when: is_rhel is defined
|
||||
tags:
|
||||
- config
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
- service
|
||||
|
||||
- name: iptables
|
||||
action: template src={{ item }} dest=/etc/sysconfig/iptables mode=600 backup=yes
|
||||
template: src={{ item }} dest=/etc/sysconfig/iptables mode=600 backup=yes
|
||||
with_first_found:
|
||||
- "{{ iptables }}"
|
||||
- "{{ files }}/iptables/iptables.{{ ansible_fqdn }}"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
- name: install postfix
|
||||
action: yum pkg=postfix state=present
|
||||
yum: pkg=postfix state=present
|
||||
tags:
|
||||
- postfix
|
||||
- packages
|
||||
|
||||
- name: /etc/postfix/main.cf
|
||||
action: copy src={{ item }} dest=/etc/postfix/main.cf
|
||||
copy: src={{ item }} dest=/etc/postfix/main.cf
|
||||
with_first_found:
|
||||
- "{{ postfix_maincf }}"
|
||||
- "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ ansible_fqdn }}"
|
||||
|
@ -20,6 +20,6 @@
|
|||
- config
|
||||
|
||||
- name: enable postfix to start
|
||||
action: service name=postfix state=running enabled=true
|
||||
service: name=postfix state=running enabled=true
|
||||
tags:
|
||||
- service
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
- name: upstart serial setup
|
||||
action: copy src="{{ files }}/common/ttyS0.conf" dest=/etc/init/ttyS0.conf
|
||||
copy: src="{{ files }}/common/ttyS0.conf" dest=/etc/init/ttyS0.conf
|
||||
when: is_rhel is defined
|
||||
tags:
|
||||
- configs
|
||||
|
|
|
@ -28,12 +28,12 @@
|
|||
when: inventory_hostname not in result.list_vms
|
||||
|
||||
- name: start the vm up
|
||||
action: virt state=running name={{ inventory_hostname }}
|
||||
virt: state=running name={{ inventory_hostname }}
|
||||
delegate_to: "{{ vmhost }}"
|
||||
when: inventory_hostname not in result.list_vms
|
||||
|
||||
- name: set it to autostart
|
||||
action: virt command=autostart name={{ inventory_hostname }}
|
||||
virt: command=autostart name={{ inventory_hostname }}
|
||||
delegate_to: "{{ vmhost }}"
|
||||
when: inventory_hostname not in result.list_vms
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: put rhel repos on rhel systems
|
||||
action: copy src="{{ files }}/common/rhel{{ ansible_distribution_major_version }}.repo" dest="/etc/yum.repos.d/rhel{{ ansible_distribution_major_version }}.repo"
|
||||
copy: src="{{ files }}/common/rhel{{ ansible_distribution_major_version }}.repo" dest="/etc/yum.repos.d/rhel{{ ansible_distribution_major_version }}.repo"
|
||||
when: ansible_distribution == 'RedHat'
|
||||
tags:
|
||||
- config
|
||||
|
@ -8,7 +8,7 @@
|
|||
- yumrepos
|
||||
|
||||
- name: put epel repos on el systems
|
||||
action: copy src="{{ files }}/common/epel{{ ansible_distribution_major_version }}.repo" dest="/etc/yum.repos.d/epel{{ ansible_distribution_major_version }}.repo"
|
||||
copy: src="{{ files }}/common/epel{{ ansible_distribution_major_version }}.repo" dest="/etc/yum.repos.d/epel{{ ansible_distribution_major_version }}.repo"
|
||||
when: ((ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') and use_default_epel)
|
||||
tags:
|
||||
- config
|
||||
|
@ -16,7 +16,7 @@
|
|||
- yumrepos
|
||||
|
||||
- name: put fedora repos on primary architecture systems
|
||||
action: copy src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}"
|
||||
copy: src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}"
|
||||
with_items:
|
||||
- fedora.repo
|
||||
- fedora-updates.repo
|
||||
|
@ -28,7 +28,7 @@
|
|||
- yumrepos
|
||||
|
||||
- name: put fedora repos on secondary architecture systems
|
||||
action: copy src="{{ files }}/common/{{ item }}-secondary" dest="/etc/yum.repos.d/{{ item }}"
|
||||
copy: src="{{ files }}/common/{{ item }}-secondary" dest="/etc/yum.repos.d/{{ item }}"
|
||||
with_items:
|
||||
- fedora.repo
|
||||
- fedora-updates.repo
|
||||
|
@ -40,7 +40,7 @@
|
|||
- yumrepos
|
||||
|
||||
- name: add infrastructure repo
|
||||
action: copy src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}"
|
||||
copy: src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}"
|
||||
with_items:
|
||||
- infrastructure.repo
|
||||
- infrastructure-testing.repo
|
||||
|
|
Loading…
Reference in New Issue