Created
July 12, 2016 19:18
-
-
Save jlaska/e2fd5d7ec39e04bcf42f807514db9411 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
vars: | |
repo_file: '/etc/apt/sources.list.d/ppa_jal233_proot_trusty.list' | |
tasks: | |
- name: 'Remove repo file' | |
file: | |
path: '{{ repo_file }}' | |
state: 'absent' | |
- name: 'Install apt repo with mode:0400' | |
apt_repository: | |
repo: 'ppa:jal233/proot' | |
mode: '0400' | |
- name: 'stat the repo_file' | |
stat: | |
path: '{{ repo_file }}' | |
register: before_stat | |
- name: 'Install apt repo with mode:0644 perms' | |
apt_repository: | |
repo: 'ppa:jal233/proot' | |
mode: '0400' | |
register: result | |
- name: 'stat the repo_file' | |
stat: | |
path: '{{ repo_file }}' | |
register: after_stat | |
- assert: | |
that: | |
- "'{{ before_stat.stat.mode }}' == '0400'" | |
- "'{{ after_stat.stat.mode }}' == '0644'" | |
- '{{ result.changed }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment