1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #6165 from risaacson/fix_fetch_integration

Fix fails on ubuntu due to missing /etc/motd

Tests functional on centos6, ubuntu1204 and ubuntu1310 now.
This commit is contained in:
Richard Isaacson 2014-02-25 13:45:10 -06:00
commit 86d8c58bd2

View file

@ -16,11 +16,11 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
- name: set the output location - name: create a file that we can use to fetch
set_fact: output_file={{ output_dir }}/motd copy: content="test" dest={{ output_dir }}/orig
- name: fetch the motd - name: fetch the motd
fetch: src=/etc/motd dest={{ output_file }} fetch: src={{ output_dir }}/orig dest={{ output_dir }}/fetched
register: fetched register: fetched
- debug: var=fetched - debug: var=fetched
@ -30,7 +30,7 @@
# fetch module. # fetch module.
- name: diff what we fetched with the original file - name: diff what we fetched with the original file
shell: diff /etc/motd {{ output_dir }}/motd/127.0.0.1/etc/motd shell: diff {{ output_dir }}/orig {{ output_dir }}/fetched/127.0.0.1/root/ansible_testing/orig
register: diff register: diff
- name: check the diff to make sure they are the same - name: check the diff to make sure they are the same