Last active
April 23, 2018 11:23
-
-
Save nbraud/e514bef994521388a0984e1a3a668854 to your computer and use it in GitHub Desktop.
Test for the Ansible apt module
This file contains 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
/.vagrant | |
/log | |
*.retry |
This file contains 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
[defaults] | |
inventory = ./.vagrant/provisioners/ansible/inventory | |
log_path = ./log | |
nocows=1 | |
[ssh_connection] | |
ssh_args = -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no |
This file contains 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: default | |
become: yes | |
tasks: | |
- name: Uninstall ZSH | |
apt: | |
name: zsh | |
state: absent | |
autoremove: yes | |
- name: Install the APT module for python | |
apt: | |
name: | |
- python-apt | |
- python3-apt | |
state: present |
This file contains 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: default | |
become: yes | |
tasks: | |
- name: Install zsh-antigen | |
apt: | |
name: zsh-antigen | |
state: present | |
- name: Install zsh | |
apt: | |
name: zsh | |
state: present | |
- name: Uninstall zsh-antigen | |
apt: | |
name: zsh-antigen | |
state: absent | |
- name: apt autoremove | |
apt: | |
autoremove: yes | |
- name: Check that ZSH is installed | |
command: zsh -c true |
This file contains 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
Vagrant.configure("2") do |config| | |
config.vm.box = "debian/stretch64" | |
# Disable the new default behavior introduced in Vagrant 1.7, to | |
# ensure that all Vagrant machines will use the same SSH key pair. | |
# See https://github.com/mitchellh/vagrant/issues/5005 | |
config.ssh.insert_key = false | |
config.vm.provision "ansible" do |ansible| | |
ansible.verbose = "v" | |
ansible.playbook = "provision.yml" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment