Fix all tasks to not use old action: statements.

This commit is contained in:
Kevin Fenzi 2016-01-06 21:25:10 +00:00
parent ba75919326
commit 4cafc2bd37
9 changed files with 22 additions and 22 deletions

View file

@ -17,23 +17,23 @@
- packages - packages
- name: put step-tickers in place - 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 when: ansible_cmdline.ostree is not defined
tags: tags:
- ntp - ntp
- config - config
- name: enable the service - 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 when: ansible_cmdline.ostree is not defined
#- name: edit hostname to be instance name - prefix hostbase var if it exists #- 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: # tags:
# - config # - config
- name: add ansible root key - name: add ansible root key
action: authorized_key user=root key="{{ item }}" authorized_key: user=root key="{{ item }}"
with_file: with_file:
- /srv/web/infra/ansible/roles/base/files/ansible-pub-key - /srv/web/infra/ansible/roles/base/files/ansible-pub-key
tags: tags:
@ -49,12 +49,12 @@
ignore_errors: true ignore_errors: true
- name: enable ssh_sysadm_login sebool - 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 ignore_errors: true
# note - kinda should be a handler - but handlers need args # note - kinda should be a handler - but handlers need args
- name: restorecon - name: restorecon
action: command restorecon -R /root/.ssh command: restorecon -R /root/.ssh
tags: tags:
- config - config

View file

@ -5,7 +5,7 @@
# #
- name: Install common scripts - 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: with_fileglob:
-"{{ files }}/common-scripts/*" -"{{ files }}/common-scripts/*"
tags: tags:

View file

@ -1,11 +1,11 @@
- name: add infra repo - 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 when: is_rhel is defined
tags: tags:
- config - config
- name: install cloud-utils - name: install cloud-utils
action: yum name=cloud-utils state=present yum: name=cloud-utils state=present
tags: tags:
- packages - packages

View file

@ -1,5 +1,5 @@
- name: add infra repo - 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 when: is_rhel is defined
tags: tags:
- config - config

View file

@ -22,7 +22,7 @@
- service - service
- name: iptables - 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: with_first_found:
- "{{ iptables }}" - "{{ iptables }}"
- "{{ files }}/iptables/iptables.{{ ansible_fqdn }}" - "{{ files }}/iptables/iptables.{{ ansible_fqdn }}"

View file

@ -1,11 +1,11 @@
- name: install postfix - name: install postfix
action: yum pkg=postfix state=present yum: pkg=postfix state=present
tags: tags:
- postfix - postfix
- packages - packages
- name: /etc/postfix/main.cf - 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: with_first_found:
- "{{ postfix_maincf }}" - "{{ postfix_maincf }}"
- "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ ansible_fqdn }}" - "{{ roles }}/base/files/postfix/main.cf/main.cf.{{ ansible_fqdn }}"
@ -20,6 +20,6 @@
- config - config
- name: enable postfix to start - name: enable postfix to start
action: service name=postfix state=running enabled=true service: name=postfix state=running enabled=true
tags: tags:
- service - service

View file

@ -1,7 +1,7 @@
--- ---
- name: upstart serial setup - 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 when: is_rhel is defined
tags: tags:
- configs - configs

View file

@ -28,12 +28,12 @@
when: inventory_hostname not in result.list_vms when: inventory_hostname not in result.list_vms
- name: start the vm up - name: start the vm up
action: virt state=running name={{ inventory_hostname }} virt: state=running name={{ inventory_hostname }}
delegate_to: "{{ vmhost }}" delegate_to: "{{ vmhost }}"
when: inventory_hostname not in result.list_vms when: inventory_hostname not in result.list_vms
- name: set it to autostart - name: set it to autostart
action: virt command=autostart name={{ inventory_hostname }} virt: command=autostart name={{ inventory_hostname }}
delegate_to: "{{ vmhost }}" delegate_to: "{{ vmhost }}"
when: inventory_hostname not in result.list_vms when: inventory_hostname not in result.list_vms

View file

@ -1,6 +1,6 @@
--- ---
- name: put rhel repos on rhel systems - 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' when: ansible_distribution == 'RedHat'
tags: tags:
- config - config
@ -8,7 +8,7 @@
- yumrepos - yumrepos
- name: put epel repos on el systems - 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) when: ((ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS') and use_default_epel)
tags: tags:
- config - config
@ -16,7 +16,7 @@
- yumrepos - yumrepos
- name: put fedora repos on primary architecture systems - 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: with_items:
- fedora.repo - fedora.repo
- fedora-updates.repo - fedora-updates.repo
@ -28,7 +28,7 @@
- yumrepos - yumrepos
- name: put fedora repos on secondary architecture systems - 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: with_items:
- fedora.repo - fedora.repo
- fedora-updates.repo - fedora-updates.repo
@ -40,7 +40,7 @@
- yumrepos - yumrepos
- name: add infrastructure repo - 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: with_items:
- infrastructure.repo - infrastructure.repo
- infrastructure-testing.repo - infrastructure-testing.repo