Using Ansible 2.4.2.0 on Ubuntu 16.04, I try running a plaubook with the following:
- name: Create repo line in Ubuntu/Debian
command: bash -c "echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" "
register: docker_repo_line
when:
ansible_distribution == ‘Debian’
or
ansible_distribution == ‘Ubuntu’ - debug:
msg: “{{ docker_repo_line.stdout }}”
when:
ansible_distribution == ‘Debian’
or
ansible_distribution == ‘Ubuntu’ - name: Add Docker Repo on Ubuntu/Debian
apt_repository:
repo: “{{ docker_repo_line.stdout }}”
state: present
when:
ansible_distribution == ‘Debian’
or
ansible_distribution == ‘Ubuntu’
However, the Debig Module set the message as “hello, world” when I run the command. Looking at the module documentation, this is the default if no msg is specified. However, I do I have line for hte message. Am I missing something here?