Article original publié le : 19 août 2021 Mise a jour le : L’installation du client vpn Windscribe avec Ansible Creation du role
1 |
$ ansible-galaxy init role_windscribe |
L’inventaire
1 |
$ vim hosts |
1 2 |
[local] admin ansible_connection=local |
Le playbook
1 |
$ vim playbook |
1 2 3 4 5 |
- name: role_windscribe hosts: all become: yes roles: - role_windscribe |
Les tasks
1 |
$ vim main.yml |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
--- # tasks role_windscribe - name: Ajouter la clé et l'id apt_key: keyserver: keyserver.ubuntu.com id: FDC247B7 - name: Installer le repo apt pour Windscribe apt_repository: repo: "deb https://repo.windscribe.com/ubuntu bionic main" state: present filename: windscribe-repo update_cache: true - name: Installer Windscribe apt: name: windscribe-cli state: present |
L’exécution
1 |
$ ansible-playbook -i inventories playbooks/playbook.yml |
L’arborescence
1 |
$ tree |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
. ├── inventories │ ├── group_vars │ ├── hosts │ └── host_vars ├── playbooks │ └── playbook.yml ├── README.md └── role_windscribe ├── defaults │ └── main.yml ├── files ├── handlers ├── meta │ └── main.yml ├── tasks │ └── main.yml └── templates |
[…]