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
if self.playbook_id == 'ansible-cmd':
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",
"register", "sudo", "sudo_user", "tags",
"transport", "when"):

View File

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

View File

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