2022 Developer Survey is open! Take survey.

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
0 votes
1 answer
183 views

Ansible | conditional statements should not include jinja2 templating | when group_name variable

I have a simple ansible main_task.yml file which is looped from a main.yml . inventory.ini [port_22] 192.168.0.189 192.168.0.199 [port_222] 192.168.0.199 [port_888] 192.168.0.200 main_task.yml --- - ...
user avatar
0 votes
0 answers
28 views

Search and list AWX-Inventory in a playbook

I need help with Ansible AWX Inventory. We have many/different inventories on our AWX server which we are importing through different methods. I have a requirement to search and fetch inventory names ...
user avatar
0 votes
0 answers
44 views

Ansible module for Brocade/ICX is misbehaving

I've to perform some network automation in my infra using ansible. When i'm trying to use ansible module for icx switches it seems to be misbehaving. Playbook i used - name: ICX switch testing hosts:...
user avatar
  • 46
0 votes
0 answers
42 views

Automate Percona Server installation

I'm installing Percona Server 8.0 on Ubuntu using ansible, so it's non-interactive. I'm trying to run the post-install mysql_secure_installation program, but that's not much good without interaction. ...
user avatar
  • 2,968
0 votes
1 answer
474 views

Add new disk to LVM group using ansible module

Team, there are lvol module but I am having hard time find way to add new device to existing VG group. so I took alternate route to use shell module and running RAW commands. but is there a way I can ...
user avatar
  • 111
0 votes
0 answers
32 views

Consecutive commands depending on each other

I'm trying to get a configuration in a specific port in Nokia device with ansible and I have to run consecutive commands to get the results like : A:XXXX# configure service vprn YYY A:XXXX>...
user avatar
-8 votes
1 answer
1k views

I have 50 servers. Want to update /etc/hosts file using ansible [closed]

I would like to update /etc/hosts file using ansible playbook to all my 50 servers. <ipaddress> <fqdn> <hostname>
user avatar
  • 125
1 vote
1 answer
336 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: “...
user avatar
0 votes
1 answer
2k 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 ...
user avatar
0 votes
1 answer
5k 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 ...
user avatar
3 votes
2 answers
2k 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 ...
user avatar
0 votes
2 answers
1k 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 ...
user avatar
  • 3
2 votes
1 answer
3k 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 ...
user avatar
  • 23
0 votes
2 answers
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 ...
user avatar
0 votes
1 answer
290 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: ...
user avatar
  • 386
1 vote
0 answers
36 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 ...
user avatar
-2 votes
2 answers
1k 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: ...
user avatar
1 vote
1 answer
9k 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: "...
user avatar
1 vote
1 answer
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, ...
user avatar
  • 111
1 vote
1 answer
153 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 ...
user avatar
  • 5,691