Questions tagged [ansible-galaxy]

Ansible Galaxy is a portal that provides Ansible roles that are shared by users and could be used by other users (e.g. instead of creating a role that installs git, a user could search a role in Ansible Galaxy and reuse it)

Filter by
Sorted by
Tagged with
1
vote
1answer
104 views

Ansible module to look for new hostname and update config file

Can you help fix this? I am trying to write the hostname into a file. --- - name: Update host. hosts: all connection: local # Default Value domain: '{{ default_domain }}' hostname: “...
0
votes
1answer
987 views

Ansible variable is not being updated

Ansible variable is not being updated from on unmatched conditions I have the below playbook which actually compares two routers(basically pairs) for running configuration and if there is a match and ...
0
votes
1answer
3k views

How to read ansible debug output as a variable in Json file .. example below

This is my debug output .. register: create - debug: msg: "{{ create.json.info.0.value }}" ok: [localhost] => { "msg": "8308a020-5c9d-4936-8f1a-40f408d3a085" } Now I need to add ...
2
votes
2answers
1k views

How can I replace a template file in an Ansible role?

Some Ansible roles, such as https://github.com/bertvv/ansible-role-hosts, use template files that may be a near miss for the needs of this project. When the role author has not provided a variable ...
0
votes
2answers
821 views

ansible replace module is not working as expected

my ansible play book is working for me to uncomment certain lines in a .conf file, but its failing for one particular line its not making any change. below is my .conf file part. #<VirtualHost ...
2
votes
1answer
1k views

ansible -how to pickup hostname and create self signed certificate

i have working command for creating self signed certificate for IHS server's .kdb file and i was trying to use the same command through ansible. Here my aim is that ansible should detect the hostname ...
0
votes
1answer
2k views

Where do I put group_vars in an ansible setup and galaxy role

I'm trying to use my first playbook with a galaxy role and while I can get the role to run, I can't seem to get it to find the group_vars I've defined. The role is nickjj.mariadb (not that that ...
0
votes
1answer
202 views

ansible: insert content of wordpress unique keys and salt into variable

in handlers/main.yml I've got: - name: get API information for wp-config uri: url: "https://api.wordpress.org/secret-key/1.1/salt/" return_contents: yes register: ...
1
vote
0answers
34 views

change a group_var on every 20 executions

I have an Ansible project with more or less 100 hosts (much more in a near future), this project does several calls to an API that as a limit rate of 1000 calls per token. In my project I define the ...
-2
votes
2answers
879 views

Error while connecting to remote host using Ansible [closed]

Geting error while connecting to remote Mysql host using Ansible. Playbook as below --- - name: "Create database" login_host: host.xyz.com login_password: "{{ mysql_root_pass }}" login_port: ...
1
vote
1answer
5k views

Ansible: access variables and dump to CSV file

vars: servers: - name: centos port: 22 tasks: - name: Check if remote port wait_for: host={{ item.name }} port={{ item.port }} timeout=1 ignore_errors: True register: out with_items: "...
1
vote
1answer
2k views

How to specify default variables for imported Ansible Galaxy roles?

When writing a custom role for an Ansible playbook, it's possible to specify defaults. I would like to do the same when using a role from Ansible Galaxy (the Ansible “package manager”). For example, ...
1
vote
1answer
142 views

Why is the travis badge not assigned to the role in ansible galaxy?

According to this documentation it should be possible to add a travis badge to an ansible role in galaxy: Push the changes to your GitHub repo. This will kick-off a Travis build. When the build ...