Created
November 30, 2023 18:26
-
-
Save zeitounator/b71b216ffe5d05d67d2af8a3441eba4a to your computer and use it in GitHub Desktop.
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
$ ansible --version | |
ansible [core 2.15.6] | |
config file = None | |
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] | |
ansible python module location = /home/user/.local/lib/python3.10/site-packages/ansible | |
ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections | |
executable location = /home/user/.local/bin/ansible | |
python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3) | |
jinja version = 3.1.2 | |
libyaml = True | |
$ cat test.yml | |
--- | |
- hosts: localhost | |
gather_facts: false | |
tasks: | |
- ini_file: | |
path: toto.conf | |
section: null | |
option: fav | |
value: juice | |
$ # Create the empty conf file | |
$ cat /dev/null > toto.conf | |
$ ansible-playbook test.yml | |
PLAY [localhost] **************************************************************************************************************************************************** | |
TASK [ini_file] ***************************************************************************************************************************************************** | |
changed: [localhost] | |
PLAY RECAP ********************************************************************************************************************************************************** | |
localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
$ cat toto.conf | |
fav = juice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment