Change all the old first_available_file to with_first_found

This commit is contained in:
Kevin Fenzi 2014-06-12 20:15:37 +00:00
parent 30be2d482f
commit 3947d129f2
3 changed files with 7 additions and 7 deletions

View file

@ -92,7 +92,7 @@ class LogMech(object):
res['task_args'] = task.module_args res['task_args'] = task.module_args
if self.playbook_id == 'ansible-cmd': if self.playbook_id == 'ansible-cmd':
res['task_userid'] = getlogin() res['task_userid'] = getlogin()
for k in ("delegate_to", "environment", "first_available_file", for k in ("delegate_to", "environment", "with_first_found",
"local_action", "notified_by", "notify", "local_action", "notified_by", "notify",
"register", "sudo", "sudo_user", "tags", "register", "sudo", "sudo_user", "tags",
"transport", "when"): "transport", "when"):

View file

@ -14,7 +14,7 @@
- name: sshd_config - name: sshd_config
copy: src={{ item }} dest=/etc/ssh/sshd_config mode=600 copy: src={{ item }} dest=/etc/ssh/sshd_config mode=600
first_available_file: with_first_found:
- "{{ sshd_config }}" - "{{ sshd_config }}"
- ssh/sshd_config.{{ ansible_fqdn }} - ssh/sshd_config.{{ ansible_fqdn }}
- ssh/sshd_config.{{ host_group }} - ssh/sshd_config.{{ host_group }}
@ -87,7 +87,7 @@
- name: iptables - name: iptables
template: src={{ item }} dest=/etc/sysconfig/iptables mode=600 backup=yes template: src={{ item }} dest=/etc/sysconfig/iptables mode=600 backup=yes
first_available_file: with_first_found:
- "{{ iptables }}" - "{{ iptables }}"
- iptables/iptables.{{ ansible_fqdn }} - iptables/iptables.{{ ansible_fqdn }}
- iptables/iptables.{{ host_group }} - iptables/iptables.{{ host_group }}
@ -103,7 +103,7 @@
# XXX fixme # a datacenter 'fact' from setup # XXX fixme # a datacenter 'fact' from setup
- name: /etc/resolv.conf - name: /etc/resolv.conf
copy: src={{ item }} dest=/etc/resolv.conf copy: src={{ item }} dest=/etc/resolv.conf
first_available_file: with_first_found:
- "{{ resolvconf }}" - "{{ resolvconf }}"
- resolv.conf/{{ ansible_fqdn }} - resolv.conf/{{ ansible_fqdn }}
- resolv.conf/{{ host_group }} - resolv.conf/{{ host_group }}
@ -116,7 +116,7 @@
- name: rsyslog.conf - name: rsyslog.conf
copy: src={{ item }} dest=/etc/rsyslog.conf mode=644 copy: src={{ item }} dest=/etc/rsyslog.conf mode=644
first_available_file: with_first_found:
- rsyslog/rsyslog.conf.{{ dist_tag }} - rsyslog/rsyslog.conf.{{ dist_tag }}
- rsyslog/rsyslog.conf.default - rsyslog/rsyslog.conf.default
@ -156,7 +156,7 @@
- name: /etc/postfix/main.cf - name: /etc/postfix/main.cf
copy: src={{ item }} dest=/etc/postfix/main.cf copy: src={{ item }} dest=/etc/postfix/main.cf
first_available_file: with_first_found:
- "{{ postfix_maincf }}" - "{{ postfix_maincf }}"
- "postfix/main.cf/main.cf.{{ ansible_fqdn }}" - "postfix/main.cf/main.cf.{{ ansible_fqdn }}"
- "postfix/main.cf/main.cf.{{ host_group }}" - "postfix/main.cf/main.cf.{{ host_group }}"

View file

@ -45,7 +45,7 @@
# #
- name: setup /etc/fas.conf for client use - name: setup /etc/fas.conf for client use
template: src={{ item }} dest=/etc/fas.conf owner=root mode=600 template: src={{ item }} dest=/etc/fas.conf owner=root mode=600
first_available_file: with_first_found:
- "{{ ansible_fqdn }}.fas.conf.j2" - "{{ ansible_fqdn }}.fas.conf.j2"
- "{{ ansible_hostname }}.fas.conf.j2" - "{{ ansible_hostname }}.fas.conf.j2"
- "{{ ansible_hostname }}.fas.conf.j2" - "{{ ansible_hostname }}.fas.conf.j2"